[
https://issues.apache.org/jira/browse/MAHOUT-406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873655#action_12873655
]
Sebastian Schelter commented on MAHOUT-406:
-------------------------------------------
I think it's absolutely ok that these classes don't know which items exist and
that they would return NaN for non-existing items too. In my application code I
already wrote a wrapper around the jdbc-backed ItemSimilarity that catches
NoSuchItemExceptions and returns NaN then.
The important thing is IMHO that all implementations act consistently because
one might experience strange behavior otherwise. I ran into that issue cause I
wrote a unit test for a component that normally uses a jdbc-backed
ItemSimilarity. In the test I changed the implementation in use to
GenericItemSimilarity and expected to catch a NoSuchItemException for unknown
items, which wasn't thrown and made my tests fail.
> 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.