update guide

This commit is contained in:
tqchen
2015-01-01 05:42:03 -08:00
parent 06206e1d03
commit 90a8505208
6 changed files with 122 additions and 9 deletions

View File

@@ -18,7 +18,7 @@ lib:
libmpi:
cd ..;make lib/librabit_mpi.a;cd -
kmeans.o: kmeans.cpp ../src/*.h
kmeans.o: kmeans.cc ../src/*.h
# we can link against MPI version to get use MPI
kmeans.rabit: kmeans.o lib

View File

@@ -1,3 +1,8 @@
Toolkit
====
This folder contains example toolkit developed using rabit
KMeans
====
* Kmeans taks in LIBSVM format
* You will need a dummy label field at beginning of all the lines to get KMeans

View File

@@ -43,7 +43,7 @@ struct SparseMat {
feat_dim = 0;
float label; bool init = true;
char tmp[1024];
while (fscanf(file, "%s", tmp) == 1) {
while (fscanf(fi, "%s", tmp) == 1) {
Entry e;
if (sscanf(tmp, "%u:%f", &e.findex, &e.fvalue) == 2) {
data.push_back(e);