[ 
https://issues.apache.org/jira/browse/MAHOUT-406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sean Owen updated MAHOUT-406:
-----------------------------

    Fix Version/s: 0.4
         Priority: Minor  (was: Major)

NoSuchItemException is the right behavior.

The problem is this class doesn't know which items actually exist. Just because 
it has no similarities for an item doesn't mean it doesn't exist.

It could add a check purely to implement this behavior but I think that's 
overkill.

instead I think this is best solved with documentation. These methods should 
document that they return NaN for unknown similarities, and one reason they 
might be unknown is because an item doesn't exist.

> Inconsistent return values of different ItemSimilarity implementations
> ----------------------------------------------------------------------
>
>                 Key: MAHOUT-406
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-406
>             Project: Mahout
>          Issue Type: Bug
>          Components: Collaborative Filtering
>            Reporter: Sebastian Schelter
>            Priority: Minor
>             Fix For: 0.4
>
>
> org.apache.mahout.cf.taste.impl.similarity.GenericItemSimilarity returns 
> Double.NaN if you request the similarity for two itemIDs it doesn't know, 
> while  
> org.apache.mahout.cf.taste.impl.similarity.jdbc.AbstractJDBCItemSimilarity 
> throws a NoSuchItemException.
> They should act consistently (and both return Double.NaN, I guess).

-- 
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