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

Sebastian Schelter updated MAHOUT-1303:
---------------------------------------

    Resolution: Not A Problem
        Status: Resolved  (was: Patch Available)

The code is correct here, its just hard to understand:

If an item is not similar, than the estimate is NaN.

If we do not want to exclude items that are not similar to all input items, we 
never add the NaNs to the average and therefore get a non-NaN result.

If we do not want to exclude items that are not similar to all input items, we 
add the NaN, which will make the whole average to be NaN.

> GenericItemBasedRecommender.estimate(id) method  confusing (line 347-349)
> -------------------------------------------------------------------------
>
>                 Key: MAHOUT-1303
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-1303
>             Project: Mahout
>          Issue Type: Bug
>          Components: Collaborative Filtering
>    Affects Versions: 0.9
>            Reporter: chsz wu
>            Assignee: Sebastian Schelter
>            Priority: Minor
>             Fix For: 0.9
>
>         Attachments: MAHOUT-1303.patch
>
>
> --------
>  if (excludeItemIfNotSimilarToAll || !Double.isNaN(estimate)) {  -- line 347
>           average.addDatum(estimate);
>         }
> -----
> line 347 seems logic confusing, 
> if excludeItemIfNotSimilarToAll == true, -> always add data into average, 
> doesn't matter what the data is , Nan ???



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to