Hmn, no, both forms work for me running k-means on Reuters. Run this and tell me what you see.

./bin/mahout clusterdump -s clusters -b 100 -n 20

On 5/21/10 3:39 PM, Jeff Eastman wrote:
Hi Delroy,

Looking at your command line, the -i argument needs to be the directory containing all the input data, not the input file itself. It could be that the code that scans the input data to sample -k clusters is failing too quietly. What is in clusters when you are done?

Try running:

hadoop jar /mahout/core/target/mahout-core-0.4-SNAPSHOT.job org.apache.mahout.clustering.kmeans.KMeansDriver \
-i trecdata-vectors/vectors \
-c clusters \
-o trecdata-kmeans-clusters \
-dm org.apache.mahout.common.distance.CosineDistanceMeasure \
-x 20 -cd 0.5 -k 26 -ow -r 8 -cl



On 5/21/10 1:36 PM, Delroy Cameron wrote:
so i tried keep getting an invocation exception when attempting to do k-means
clustering and it is really crucial that i get around this problem...

i am checking out the code from the alternate repo
svn co http://svn.apache.org/repos/asf/lucene/mahout/trunk

here is my command
hadoop jar /mahout/core/target/mahout-core-0.4-SNAPSHOT.job
org.apache.mahout.clustering.kmeans.KMeansDriver -i
trecdata-vectors/vectors/part-00000 -o trecdata-kmeans-clusters -c clusters -dm org.apache.mahout.common.distance.CosineDistanceMeasure -x 20 -cd 0.5 -k
26 -ow -r 8 -cl

here is my output
java.lang.RuntimeException: Error in configuring object
    at
org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:93) at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:64)
    at
org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:117)
    at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:354)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:307)
    at org.apache.hadoop.mapred.Child.main(Child.java:170)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:88)
    ... 5 more
Caused by: java.lang.RuntimeException: Error in configuring object
    at
org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:93) at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:64)
    at
org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:117)
    at org.apache.hadoop.mapred.MapRunner.configure(MapRunner.java:34)
    ... 10 more
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:88)
    ... 13 more
Caused by: java.lang.IllegalStateException: Cluster is empty!
    at
org.apache.mahout.clustering.kmeans.KMeansMapper.configure(KMeansMapper.java:74)
    ... 18 more


-----
--cheers
Delroy



Reply via email to