Re: SequenceFile cast problems

2011-12-19 Thread Grant Ingersoll
I believe it is supposed to, at least at the high level. We don't have any 1-1 tests, so YMMV. On Dec 17, 2011, at 8:26 PM, Lance Norskog wrote: > Does the new approach do the same thing as the old approach? > > On Thu, Dec 15, 2011 at 1:56 AM, Daniele Volpi wrote: >> Yes Grant that was the

Re: SequenceFile cast problems

2011-12-17 Thread Lance Norskog
Does the new approach do the same thing as the old approach? On Thu, Dec 15, 2011 at 1:56 AM, Daniele Volpi wrote: > Yes Grant that was the point of my first question.. > Now I'll take a look at the vector implementation. > Thanks again > Daniele > > On 14 December 2011 23:44, Grant Ingersoll wr

Re: SequenceFile cast problems

2011-12-15 Thread Daniele Volpi
Yes Grant that was the point of my first question.. Now I'll take a look at the vector implementation. Thanks again Daniele On 14 December 2011 23:44, Grant Ingersoll wrote: > While Ted answered the Dissector question, your original issue, I believe, is > that Mahout currently has two different

Re: SequenceFile cast problems

2011-12-14 Thread Grant Ingersoll
While Ted answered the Dissector question, your original issue, I believe, is that Mahout currently has two different NB implementations. trainclassifier/testclassifier use the old, word based package which requires Text as input. The new package, which TrainNaiveBayesJob uses, requires Vecto

Re: SequenceFile cast problems

2011-12-14 Thread Daniele Volpi
Ok, i was thinking i could easily use the ModelDissector class because requires an AbstractVectorClassifier and the StandardNaiveBayesClassifier in the naivebayes package extends that class. On 14 December 2011 14:42, Ted Dunning wrote: > > I think that using the model dissector with NaiveBayes w

Re: SequenceFile cast problems

2011-12-14 Thread Ted Dunning
I think that using the model dissector with NaiveBayes will not work easily. The assumption inside the model dissector is that there is a model matrix compatible with logistic regression to be had. The easy way to get everything to work is to simply use a single categorical variable that can have

Re: SequenceFile cast problems

2011-12-14 Thread Daniele Volpi
The version is 0.6-SNAPSHOT >From terminal both commands trainclassifier and testclassifier work. Actually my real purpose is to use the TrainNaiveBayesJob in order to obtain a StandardNaiveBayesClassifier that i can use with the ModelDissector class similiar to chapter 15 in Mahout In Action, mayb

Re: SequenceFile cast problems

2011-12-13 Thread Ted Dunning
Which version of Mahout? And what happens when you train the classifier from the command line? On Tue, Dec 13, 2011 at 2:27 PM, Daniele Volpi wrote: > First of all i've converted the train files in the format: > target[\t]terms > through the BayesFileFormatter class. > Then i've converted these

Re: SequenceFile cast problems

2011-12-13 Thread Daniele Volpi
First of all i've converted the train files in the format: target[\t]terms through the BayesFileFormatter class. Then i've converted these files (one per category) in SequenceFile using the seqdirectory program. After that I ran this code: TrainNaiveBayesJob trainer = new TrainNaiveBayesJob(); tra

Re: SequenceFile cast problems

2011-12-13 Thread Grant Ingersoll
What steps have you done? On Dec 13, 2011, at 12:29 PM, Daniele Volpi wrote: > Hi everyone, > I'm trying to implement the Naive Bayes classifier through the > TrainNaiveBayesJob class. > After convert the text files in the required sequencefile for the "run" > method through the seqdirectory prog

SequenceFile cast problems

2011-12-13 Thread Daniele Volpi
Hi everyone, I'm trying to implement the Naive Bayes classifier through the TrainNaiveBayesJob class. After convert the text files in the required sequencefile for the "run" method through the seqdirectory program i get this error: java.lang.ClassCastException: org.apache.hadoop.io.Text cannot be