aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2012-11-16 15:23:26 +0100
committerCédric Bonhomme <kimble.mandel@gmail.com>2012-11-16 15:23:26 +0100
commit3e927164b77a325a68da7c3672a83977a2c408af (patch)
treec0ec8dfcc235d7f277bc69db8cb6160f7e5a4dbc /source
parentAdded tests with clusters. (diff)
downloadnewspipe-3e927164b77a325a68da7c3672a83977a2c408af.tar.gz
newspipe-3e927164b77a325a68da7c3672a83977a2c408af.tar.bz2
newspipe-3e927164b77a325a68da7c3672a83977a2c408af.zip
Test draw function. Set K to 8.
Diffstat (limited to 'source')
-rw-r--r--source/testclusters.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/testclusters.py b/source/testclusters.py
index 0e1e2a32..ea6406b1 100644
--- a/source/testclusters.py
+++ b/source/testclusters.py
@@ -2,11 +2,11 @@
import clusters
-K = 10
+K = 8
-blognames,labels,data = clusters.readfile("blogdata1.txt")
+blognames,words,data = clusters.readfile("blogdata1.txt")
-#coords = clusters.scaledown(data)
+coords = clusters.scaledown(data)
print "Generating clusters..."
kclust = clusters.kcluster(data, k=K)
@@ -20,4 +20,4 @@ for i in range(K):
-#clusters.draw2d(coords,blognames,jpeg='mds2d.jpg') \ No newline at end of file
+clusters.draw2d(coords,blognames,jpeg='mds2d.jpg') \ No newline at end of file
bgstack15