mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From siddharth chhabra <siddharthchha...@hotmail.com>
Subject NPE while running testclassifier
Date Mon, 08 Nov 2010 07:24:16 GMT

Hi
I am new to mahout and am using the trunk which I was able to successfully build with maven.
I tried to run the newsgroup example and was able to train the classifier successfully.
But while running the testclassifier I got a NPE as follows -

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:68)
    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:184)

I am running this locally without hadoop.
I tried following the instructions here - https://cwiki.apache.org/confluence/display/MAHOUT/Twenty+Newsgroups
I created the folder bayes-test-input and dropped in a document there for testing purposes
but that didnt seem to work.

Any pointers will be appreciated.

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