You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by Lingxiang Cheng <li...@yahoo.com> on 2012/01/01 05:16:15 UTC
Bad Token
Hi,
I prepared my own data and tried to run it through Decision Forest but I got stuck before I could run
the actually algorithm. I followed the steps listed at: https://cwiki.apache.org/MAHOUT/partial-implementation.html.
When I typed in the following command (well not exactly the same because my paths and filenames are different) I
got a "Bad Token" error. In my data I have 6 categories seperated by comma and the last colume is the lable so I
put in 6CL as my token. Is it not correct?
$HADOOP_HOME/bin/hadoop jar $MAHOUT_HOME/core/target/mahout-core-<VERSION>-job.jar
org.apache.mahout.df.tools.Describe -p testdata/KDDTrain+.arff -f testdata/KDDTrain+.info
-d 6CL
Thanks and Happy New Year!
Lingxiang
Re: Bayes and Unicode?
Posted by Ted Dunning <te...@gmail.com>.
The Bayes algorithms favor sparse data with large numbers of potential
features. Text is one kind of this data.
Using Naive Bayes with unicode should be fine. The simplest method for
processing CJK text is to use character unigrams and bigrams. This works
very well with retrieval systems, but I haven't heard if it would work with
classification although I expect it would.
On Sun, Jan 1, 2012 at 7:02 PM, Lingxiang Cheng <li...@yahoo.com>wrote:
> It's interesting that the Bayes algorithms in Mahout strongly favor text
> data than numeric data. I am thinking about using them to categorize
> chinese websites. Has anyone used it to process unicodes?
Bayes and Unicode?
Posted by Lingxiang Cheng <li...@yahoo.com>.
It's interesting that the Bayes algorithms in Mahout strongly favor text data than numeric data. I am thinking about using them to categorize chinese websites. Has anyone used it to process unicodes?
Re: Bad Token
Posted by Lingxiang Cheng <li...@yahoo.com>.
Thanks for the reply. After using 6 C L as the token, now I am getting a different error "wrong number of attributes in the string". I have tried using a csv file or a tab deliminated file and got the same error. I also converted a csv file into an ARFF file but got the same error message.
I created my files on a windows machine and copied them over. Could that be a problem?
________________________________
From: deneche abdelhakim <ad...@gmail.com>
To: user@mahout.apache.org; Lingxiang Cheng <li...@yahoo.com>
Sent: Sunday, January 1, 2012 12:17 AM
Subject: Re: Bad Token
put spaces between the letters :
6 C L
On Sun, Jan 1, 2012 at 5:16 AM, Lingxiang Cheng <li...@yahoo.com>wrote:
> Hi,
> I prepared my own data and tried to run it through Decision Forest but I
> got stuck before I could run
> the actually algorithm. I followed the steps listed at:
> https://cwiki.apache.org/MAHOUT/partial-implementation.html.
> When I typed in the following command (well not exactly the same because
> my paths and filenames are different) I
> got a "Bad Token" error. In my data I have 6 categories seperated by comma
> and the last colume is the lable so I
> put in 6CL as my token. Is it not correct?
>
> $HADOOP_HOME/bin/hadoop jar
> $MAHOUT_HOME/core/target/mahout-core-<VERSION>-job.jar
> org.apache.mahout.df.tools.Describe -p testdata/KDDTrain+.arff -f
> testdata/KDDTrain+.info
> -d 6CL
>
> Thanks and Happy New Year!
> Lingxiang
Re: Bad Token
Posted by deneche abdelhakim <ad...@gmail.com>.
put spaces between the letters :
6 C L
On Sun, Jan 1, 2012 at 5:16 AM, Lingxiang Cheng <li...@yahoo.com>wrote:
> Hi,
> I prepared my own data and tried to run it through Decision Forest but I
> got stuck before I could run
> the actually algorithm. I followed the steps listed at:
> https://cwiki.apache.org/MAHOUT/partial-implementation.html.
> When I typed in the following command (well not exactly the same because
> my paths and filenames are different) I
> got a "Bad Token" error. In my data I have 6 categories seperated by comma
> and the last colume is the lable so I
> put in 6CL as my token. Is it not correct?
>
> $HADOOP_HOME/bin/hadoop jar
> $MAHOUT_HOME/core/target/mahout-core-<VERSION>-job.jar
> org.apache.mahout.df.tools.Describe -p testdata/KDDTrain+.arff -f
> testdata/KDDTrain+.info
> -d 6CL
>
> Thanks and Happy New Year!
> Lingxiang