Sean Owen wrote:
On Thu, Feb 11, 2010 at 11:53 AM, Jonathan Worthington
<[email protected]> wrote:
ItemSimilarity SimilarityForItems = new PearsonCorrelationSimilarity(Model);

Here's the problem, and it's not obvious. Pearson only works when you
have ratings, and you don't. It'll end up being unable to compute any
similarities, so no results.

The fix is easy -- use LogLikelihoodSimilarity or
TanimotoCoefficientSimilarity, which are defined even without ratings.
I'd start with log-likelihood.

Ah, that helped, thanks. I'll play with both and see how the results come out, but using LogLikelihoodSimilarity does indeed seem to resolve the "no results" problem. Great!

Maybe it's worth adding a note about this in the doc at the top of PearsonCorrelationSimilarity.java like:

<p>Note that this is not suitable in a situation where you have a boolean model rather than ratings.</p>

I did read that bit of doc in my hunt for answers, though it didn't really click that it wouldn't work without ratings. :-)

If you're interested in more on this, I'll shamelessly plug early
access to Mahout in Action. The parts available now include all of the
coverage of recommenders, including much on this issue.
http://www.manning.com/owen/

I hadn't come across that; looks interesting.

Again, thanks,

Jonathan

Reply via email to