[ 
https://issues.apache.org/jira/browse/MAHOUT-604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12993482#comment-12993482
 ] 

Sean Owen commented on MAHOUT-604:
----------------------------------

This sounds like MAHOUT-569 but is not quite the same. I think it's another 
issue that's been uncovered.

This is the problem in ConfusionMatrix.getCount(). 
labelMap.get(classifiedLabel) is null. 

The Preconditions call looks like it's attempting to check for that, but the 
check seems wrong:
!labelMap.containsKey(correctLabel) || labelMap.containsKey(classifiedLabel) || 
defaultLabel.equals(classifiedLabel)

It seems like it would want to verify that the map contained both keys, but 
that's not what it says. The check for MAHOUT-569 changed this check but not 
that logic.

It still doesn't answer why it would be called with invalid input, but, fixing 
this is a first step perhaps. Am I on the right track?

> Bayes Classifier fails on data other than training data
> -------------------------------------------------------
>
>                 Key: MAHOUT-604
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-604
>             Project: Mahout
>          Issue Type: Bug
>          Components: Classification
>    Affects Versions: 0.4
>            Reporter: Lance Norskog
>            Assignee: Robin Anil
>             Fix For: 0.5
>
>
> The Bayes Classifier throws an exception when tested with different data than 
> the training data.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to