It makes sense to have it but still cannot compile the ClusterDumper from trunk:
Exception in thread "main" java.lang.Error: Unresolved compilation problems: The import org.apache.mahout.math.function.IntDoubleProcedure cannot be resolved The import org.apache.mahout.math.list.DoubleArrayList cannot be resolved The import org.apache.mahout.math.list.IntArrayList cannot be resolved IntArrayList cannot be resolved to a type The method keys() from the type AbstractIntDoubleMap refers to the missing type IntArrayList IntArrayList cannot be resolved to a type IntArrayList cannot be resolved to a type IntArrayList cannot be resolved to a type IntArrayList cannot be resolved to a type DoubleArrayList cannot be resolved to a type The method values() from the type AbstractIntDoubleMap refers to the missing type DoubleArrayList IntDoubleProcedure cannot be resolved to a type The method apply(int, double) of type SparseVector.DistanceSquared must override or implement a supertype method The method forEachPair(IntDoubleProcedure) from the type OpenIntDoubleHashMap refers to the missing type IntDoubleProcedure IntDoubleProcedure cannot be resolved to a type The method apply(int, double) of type SparseVector.AddToVector must override or implement a supertype method The method forEachPair(IntDoubleProcedure) from the type OpenIntDoubleHashMap refers to the missing type IntDoubleProcedure at org.apache.mahout.math.SparseVector.<init>(SparseVector.java:20) at org.apache.mahout.clustering.ClusterBase.<init>(ClusterBase.java:34) at org.apache.mahout.clustering.kmeans.Cluster.<init>(Cluster.java:140) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.Class.newInstance0(Class.java:355) at java.lang.Class.newInstance(Class.java:308) at org.apache.mahout.utils.clustering.ClusterDumper.printClusters(ClusterDumper.java:121) at org.apache.mahout.utils.clustering.ClusterDumper.main(ClusterDumper.java:253) On Sun, Jan 3, 2010 at 4:34 AM, Drew Farris <[email protected]> wrote: > On Sat, Jan 2, 2010 at 8:31 PM, Bogdan Vatkov <[email protected] > >wrote: > > > Still, is there a way to print out the current convergence after each > > iteration or something? > > > > Each cluster has its own convergence which is defined as the distance > between its center and its centroid. As a result, overall convergence is a > binary measure defined as whether all clusters are converged -- whether > each > cluster's convergence is less-than or equal to the convergence delta. > > If you are interested in the convergence measure for each cluster, you will > need to modify computeConvergence() in o.a.m.clustering.kmeans.Cluster to > either store or log the convergence. > > If there's sufficient interest in this, I can prep a patch that will allow > convergence to be stored and dumped via ClusterDumper > > Drew > -- Best regards, Bogdan
