You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mahout.apache.org by "Raviv M-G (JIRA)" <ji...@apache.org> on 2010/12/28 21:27:46 UTC
[jira] Created: (MAHOUT-569) Category names with spaces cause
NullPointerException in ConfusionMatrix when testing classifier
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.
[jira] Commented: (MAHOUT-569) Category names with spaces cause
NullPointerException in ConfusionMatrix when testing classifier
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAHOUT-569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12982616#action_12982616 ]
Hudson commented on MAHOUT-569:
-------------------------------
Integrated in Mahout-Quality #564 (See [https://hudson.apache.org/hudson/job/Mahout-Quality/564/])
MAHOUT-569 Fix a certain NPE because labels/labelsMap go out of sync somehow
> 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
> Assignee: Sean Owen
> Priority: Minor
> Fix For: 0.5
>
> Attachments: MAHOUT-569.patch
>
>
> 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.
[jira] Updated: (MAHOUT-569) Category names with spaces cause
NullPointerException in ConfusionMatrix when testing classifier
Posted by "Sean Owen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAHOUT-569?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean Owen updated MAHOUT-569:
-----------------------------
Attachment: MAHOUT-569.patch
Weird, it seems like the labels list and labelMaps map go out of sync then since it tries to check for this condition. I can imagine a few causes, but all are stopped by just querying the Map for all operations. Try this patch?
> 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
> Attachments: MAHOUT-569.patch
>
>
> 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.
[jira] Resolved: (MAHOUT-569) Category names with spaces cause
NullPointerException in ConfusionMatrix when testing classifier
Posted by "Sean Owen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAHOUT-569?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean Owen resolved MAHOUT-569.
------------------------------
Resolution: Fixed
Fix Version/s: 0.5
Assignee: Sean Owen
> 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
> Assignee: Sean Owen
> Priority: Minor
> Fix For: 0.5
>
> Attachments: MAHOUT-569.patch
>
>
> 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.