[Scipy-svn] r3071 - trunk/Lib/cluster

scipy-svn@scip... scipy-svn@scip...
Mon Jun 4 06:32:07 CDT 2007


Author: cdavid
Date: 2007-06-04 06:32:00 -0500 (Mon, 04 Jun 2007)
New Revision: 3071

Modified:
   trunk/Lib/cluster/vq.py
Log:
Add a TODO for kmeans.

Modified: trunk/Lib/cluster/vq.py
===================================================================
--- trunk/Lib/cluster/vq.py	2007-06-04 04:32:56 UTC (rev 3070)
+++ trunk/Lib/cluster/vq.py	2007-06-04 11:32:00 UTC (rev 3071)
@@ -13,12 +13,20 @@
         Calculate code book membership of obs
     kmeans(obs,k_or_guess,iter=20,thresh=1e-5) --
         Train a codebook for mimimum distortion using the kmeans algorithm
+    kmeans2
+        Similar to kmeans, but with several initialization methods.
 
 """
 __docformat__ = 'restructuredtext'
 
 __all__ = ['whiten', 'vq', 'kmeans', 'kmeans2']
 
+# TODO:
+#   - implements high level method for running several times kmeans with
+#   different initialialization 
+#   - warning: what happens if different number of clusters ? For now, emit a
+#   warning, but it is not great, because I am not sure it really make sense to
+#   succeed in this case (maybe an exception is better ?)
 import warnings
 
 from numpy.random import randint



More information about the Scipy-svn mailing list