Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Saurabh7 committed Dec 23, 2014
1 parent 6b455a1 commit 28313eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion examples/undocumented/libshogun/clustering_kmeans.cpp
Expand Up @@ -19,7 +19,6 @@
#include <shogun/features/DenseFeatures.h>
#include <shogun/clustering/KMeans.h>
#include <shogun/clustering/KMeansMiniBatch.h>
#include <shogun/clustering/KMeansLloyd.h>
#include <shogun/distance/EuclideanDistance.h>
#include <shogun/distance/MinkowskiMetric.h>

Expand Down
Expand Up @@ -4,13 +4,13 @@
parameter_list = [[traindat,3],[traindat,4]]

def clustering_kmeans_modular (fm_train=traindat,k=3):
from modshogun import EuclideanDistance, RealFeatures, KMeansLloyd, Math_init_random, CSVFile
from modshogun import EuclideanDistance, RealFeatures, KMeans, Math_init_random, CSVFile
Math_init_random(17)

feats_train=RealFeatures(CSVFile(fm_train))
distance=EuclideanDistance(feats_train, feats_train)

kmeans=KMeansLloyd(k, distance)
kmeans=KMeans(k, distance)
kmeans.train()

out_centers = kmeans.get_cluster_centers()
Expand Down

0 comments on commit 28313eb

Please sign in to comment.