[
https://issues.apache.org/jira/browse/MAHOUT-1602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14387889#comment-14387889
]
ASF GitHub Bot commented on MAHOUT-1602:
----------------------------------------
Github user smarthi commented on the pull request:
https://github.com/apache/mahout/pull/60#issuecomment-87917988
This doesn't seem correct, there is a correction that needs to be done in
the code comments which is to be addressed by MAHOUT-1602. Will close this PR
along with that Jira.
> Euclidean Distance Similarity Math
> -----------------------------------
>
> Key: MAHOUT-1602
> URL: https://issues.apache.org/jira/browse/MAHOUT-1602
> Project: Mahout
> Issue Type: Bug
> Components: Collaborative Filtering, Math
> Affects Versions: 0.9
> Reporter: Leonardo Fernandez Sanchez
> Assignee: Stevo Slavic
> Priority: Minor
> Labels: legacy
> Fix For: 0.10.0
>
>
> Within the file:
> /mrlegacy/src/main/java/org/apache/mahout/cf/taste/impl/similarity/EuclideanDistanceSimilarity.java
> Mentions that the implementation should be sqrt(n) / (1 + distance).
> Once the equation is simplified, should be:
> 1 / ((1 + distance) / sqrt(n))
> Coded:
> return 1.0 / ((1.0 + Math.sqrt(sumXYdiff2)) / Math.sqrt(n));
> But instead is (missing grouping brackets):
> 1 / (1 + distance / sqrt (n))
> Coded:
> return 1.0 / (1.0 + Math.sqrt(sumXYdiff2) / Math.sqrt(n));
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)