mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajesh Nikam <rajeshni...@gmail.com>
Subject ** Random forest: attrib description string for org.apache.mahout.classifier.df.tools.Describe **
Date Fri, 21 Sep 2012 15:33:05 GMT
I want to use Random forest for arff file using BuildForest. This requires
info file generated using org.apache.mahout.classifier.df.tools.Describe.
However facing issue how to give description string.

Please let me what is missing.

$ hadoop@ml55:/usr/local/mahout/trunk/examples$ hadoop jar
target/mahout-examples-0.8-SNAPSHOT-job.jar
org.apache.mahout.classifier.df.tools.Describe -p ./testdata/hello.arff -f
./testdata/hello.info -d "N 4 C"

gives following error:

>>> Exception in thread "main"
org.apache.mahout.classifier.df.data.DescriptorException: Bad Token : 4

when tried following parameter it gives following error:

$ hadoop jar examples/target/mahout-examples-0.8-SNAPSHOT-job.jar
org.apache.mahout.classifier.df.tools.Describe -p ./testdata/hello.arff -f
./testdata/hello.info -d "N N N N C"

Exception in thread "main" java.lang.IllegalArgumentException: Wrong number
of attributes in the string
     at
com.google.common.base.Preconditions.checkArgument(Preconditions.java:92)


------ start sample arff file ------

@relation hello

@attribute a numeric
@attribute b numeric
@attribute c numeric
@attribute d numeric
@attribute class {'normal', 'anomaly'}

@data

1,32,43,4,normal
21,22,3,4,normal
3,2,3,4,anomaly
45,12,33,4,anomaly
16,22,34,4,anomaly

------ end sample arff file ------

Thanks
Rajesh

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message