Category names with spaces cause NullPointerException in ConfusionMatrix when 
testing classifier
------------------------------------------------------------------------------------------------

                 Key: MAHOUT-569
                 URL: https://issues.apache.org/jira/browse/MAHOUT-569
             Project: Mahout
          Issue Type: Bug
          Components: Classification
    Affects Versions: 0.5
         Environment: Mac OS 10.6.5 and RHL
            Reporter: Raviv M-G
            Priority: Minor


If you try to perform classification using categories with spaces in their 
names then the classifier will happily train and create a model for you, but 
when you go to test the model you get:


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)


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to