From Mahout In Action:

You may be searching for something like “CosineMeasureSimilarity” in Mahout. You’ve actually already found it but under an unexpected name: PearsonCorrelationSimilarity. The cosine measure similarity and Pearson correlation aren’t the same thing, but, if you bother to work out the math, they actually reduce to the same computation when the two series of input values each have a mean of 0 (“centered”).

Jeff

On 4/27/10 9:34 AM, Sebastian Schelter (JIRA) wrote:
Cosine item similarity implementation
-------------------------------------

                  Key: MAHOUT-387
                  URL: https://issues.apache.org/jira/browse/MAHOUT-387
              Project: Mahout
           Issue Type: New Feature
           Components: Collaborative Filtering
             Reporter: Sebastian Schelter
          Attachments: MAHOUT-387.patch

I needed to compute the cosine similarity between two items when running 
org.apache.mahout.cf.taste.hadoop.pseudo.RecommenderJob, I couldn't find an 
implementation (did I overlook it maybe?) so I created my own. I want to share 
it here, in case you find it useful.


Reply via email to