mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From deneche abdelhakim <adene...@gmail.com>
Subject Re: ** Random forest: attrib description string for org.apache.mahout.classifier.df.tools.Describe **
Date Fri, 21 Sep 2012 15:57:43 GMT
also try without the quotation marks
-d N 4 C L

and as pointed out by Chyi-Kwei, don't forget the L (label)

On Fri, Sep 21, 2012 at 4:53 PM, chyi-kwei yau <chyikwei.yau@gmail.com>wrote:

> Hi,
>
> 1) you should remove all lines start with @. Just start with the data
> lines.
> 2) In the parameter "-d"
>      -d "N 4 C"
>     You need to specify which one is the "Label"
>     So if the last one is the label, maybe change it to
>     -d "N 4 L"
>
> Hope this can help you and please let me know if there is anything
> wrong in my description.
>
> Best,
> Chyi-Kwei
>
> On Fri, Sep 21, 2012 at 11:33 AM, Rajesh Nikam <rajeshnikam@gmail.com>
> wrote:
> > 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