And this is the error I get -
siddharth_chhabra @ ~/Downloads/devfun/mahout/$$MAHOUT_HOME/bin/mahout 
testclassifier   -m examples/bin/work/20news-bydate/bayes-model   -d 
examples/bin/work/20news-bydate/bayes-test-input   -type bayes   -ng 1   
-source hdfs   -method sequential
no HADOOP_HOME set, running locally
Nov 17, 2010 10:55:03 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: Loading model from: 
{basePath=examples/bin/work/20news-bydate/bayes-model, classifierType=bayes, 
alpha_i=1.0, dataSource=hdfs, gramSize=1, verbose=false, encoding=UTF-8, 
defaultCat=unknown, 
testDirPath=examples/bin/work/20news-bydate/bayes-test-input}
Nov 17, 2010 10:55:03 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: Testing Bayes Classifier
Nov 17, 2010 10:55:03 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: 
file:/Users/siddharth_chhabra/Downloads/devfun/mahout/examples/bin/work/20news-bydate/bayes-model/trainer-weights/Sigma_j/part-00000
Nov 17, 2010 10:55:04 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: Read 50000 feature weights
Nov 17, 2010 10:55:04 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: Read 100000 feature weights
Nov 17, 2010 10:55:04 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: 
file:/Users/siddharth_chhabra/Downloads/devfun/mahout/examples/bin/work/20news-bydate/bayes-model/trainer-weights/Sigma_k/part-00000
Nov 17, 2010 10:55:04 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: 
file:/Users/siddharth_chhabra/Downloads/devfun/mahout/examples/bin/work/20news-bydate/bayes-model/trainer-weights/Sigma_kSigma_j/part-00000
Nov 17, 2010 10:55:04 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: 190570.4012562479
Nov 17, 2010 10:55:04 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: 
file:/Users/siddharth_chhabra/Downloads/devfun/mahout/examples/bin/work/20news-bydate/bayes-model/trainer-thetaNormalizer/part-00000
Nov 17, 2010 10:55:04 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: 
file:/Users/siddharth_chhabra/Downloads/devfun/mahout/examples/bin/work/20news-bydate/bayes-model/trainer-tfIdf/trainer-tfIdf/part-00000
Nov 17, 2010 10:55:06 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: rec.sport.baseball -127395.14399316616 547567.2698760114 
-0.232656608606305
Nov 17, 2010 10:55:06 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: sci.crypt -189010.62350617323 547567.2698760114 -0.3451824714595741
Nov 17, 2010 10:55:06 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: rec.sport.hockey -166203.2548335905 547567.2698760114 -0.3035302947731423
Nov 17, 2010 10:55:06 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: talk.politics.guns -198793.14260997134 547567.2698760114 
-0.3630478911841921
Nov 17, 2010 10:55:06 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: soc.religion.christian -158106.48187003663 547567.2698760114 
-0.2887434851718539
Nov 17, 2010 10:55:06 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: sci.electronics -138650.82033374818 547567.2698760114 -0.25321239592195427
Nov 17, 2010 10:55:06 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: comp.os.ms-windows.misc -547567.2698760114 547567.2698760114 -1.0
Nov 17, 2010 10:55:06 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: misc.forsale -141981.48005545404 547567.2698760114 -0.2592950453148956
Nov 17, 2010 10:55:06 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: talk.religion.misc -134885.60852883724 547567.2698760114 
-0.2463361416020722
Nov 17, 2010 10:55:06 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: alt.atheism -134262.42728922528 547567.2698760114 -0.24519805086163576
Nov 17, 2010 10:55:06 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: comp.windows.x -172513.19965389522 547567.2698760114 -0.3150538922696353
Nov 17, 2010 10:55:06 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: talk.politics.mideast -189368.63272082788 547567.2698760114 
-0.3458362892356726
Nov 17, 2010 10:55:06 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: comp.sys.ibm.pc.hardware -134535.56471897085 547567.2698760114 
-0.24569687072317975
Nov 17, 2010 10:55:06 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: comp.sys.mac.hardware -121323.6282757108 547567.2698760114 
-0.22156844455510052
Nov 17, 2010 10:55:06 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: sci.space -189203.04544769705 547567.2698760114 -0.3455338838834164
Nov 17, 2010 10:55:06 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: rec.motorcycles -138625.2628242977 547567.2698760114 -0.25316572127418674
Nov 17, 2010 10:55:06 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: rec.autos -136935.18434679657 547567.2698760114 -0.25007919917821886
Nov 17, 2010 10:55:06 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: comp.graphics -161979.38306986375 547567.2698760114 -0.29581640828631267
Nov 17, 2010 10:55:06 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: talk.politics.misc -159579.70032298338 547567.2698760114 
-0.29143396455949216
Nov 17, 2010 10:55:06 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: sci.med -183835.5334355675 547567.2698760114 -0.3357314133790253
Exception in thread "main" java.lang.NullPointerException
    at 
org.apache.mahout.classifier.ConfusionMatrix.getCount(ConfusionMatrix.java:102)
    at 
org.apache.mahout.classifier.ConfusionMatrix.incrementCount(ConfusionMatrix.java:118)
    at 
org.apache.mahout.classifier.ConfusionMatrix.incrementCount(ConfusionMatrix.java:122)
    at 
org.apache.mahout.classifier.ConfusionMatrix.addInstance(ConfusionMatrix.java:90)
    at 
org.apache.mahout.classifier.ResultAnalyzer.addInstance(ResultAnalyzer.java:69)
    at 
org.apache.mahout.classifier.bayes.TestClassifier.classifySequential(TestClassifier.java:266)
    at 
org.apache.mahout.classifier.bayes.TestClassifier.main(TestClassifier.java:186)
    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.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:68)
    at org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:139)
    at org.apache.mahout.driver.MahoutDriver.main(MahoutDriver.java:182)

> From: [email protected]
> To: [email protected]
> Subject: RE: NPE while running testclassifier
> Date: Thu, 18 Nov 2010 06:24:25 +0000
> 
> 
> I read through the whole archive discussion but he is not getting the same 
> error as me.
> I am still getting the same NPE as before no matter how many how many 
> documents i put in  the bayes-test-input folder.
> Has anybody tested the classifier without hadoop ?
> I am on a mac os with jdk 1.6 and have not set hadoop_home variable, but set 
> mahout_home correctly.
> 
> I am in los angeles and dont mind meeting someone in person to resolve the 
> issue either.
> Any pointers will be appreciated.
> 
> Thanks
> -Sid
> > From: [email protected]
> > Date: Fri, 12 Nov 2010 23:16:48 +0530
> > Subject: Re: NPE while running testclassifier
> > To: [email protected]
> > 
> > Read through this archive discussion.
> > 
> > http://mail-archives.apache.org/mod_mbox/mahout-user/201010.mbox/%[email protected]%3e
>                                         
                                          

Reply via email to