You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by Niels Basjes <Ni...@basjes.nl> on 2010/12/16 11:35:08 UTC

Need some pointers towards algorithm capabilities.

Hi,

I'm an experienced developer yet a complete newbie when it comes to
the type of functionality Mahout offers.
I do have some experience in designing and writing MapReduce jobs in
Hadoop so I understand enough of the base platform that is used.

I want to investigate and experiment with both the item-item and
user-item recommenders in Mahout.
The problem I have is that I'm having a hard time finding a good
overview of the capabilities of the various algorithms.
Most Wikipedia articles immediately dive into the underlying
mathematical foundations instead of the practical implications I'm
looking for.
I've also not been able to find what I'm looking for in the Mahout
Wiki/Confluence.

Putting it simply I'm looking for a comprehensive overview of
- the kind of things you can and cannot do with the various algorithms
that are available in Mahout.
    - can it handle both "Implicit" and "Explicit" ratings.
    - can I 'age' the relevance of the (implicit) ratings? I.e.
Recommendations should change with the changing taste.
    - how does it handle in long tail situations (with millions of
items most are only viewed/rated very infrequently)
- what are the scaling properties of the algorithms.
    - is it always batch or can I do real-time incremental updates
with new ratings?
    - can I preprocess a daily dataset and then combine the daily sets
into "what I need"?

Thanks for any info you can point me to.

-- 
Best regards,

Niels Basjes

Re: Need some pointers towards algorithm capabilities.

Posted by Niall Riddell <ni...@xspca.com>.
I recommend buying Mahout in Action.  It's a Manning Early Access Program
publication.

Sean Owen has been helping me work through some of the code examples.

Cheers Niall

On 16 December 2010 10:35, Niels Basjes <Ni...@basjes.nl> wrote:

> Hi,
>
> I'm an experienced developer yet a complete newbie when it comes to
> the type of functionality Mahout offers.
> I do have some experience in designing and writing MapReduce jobs in
> Hadoop so I understand enough of the base platform that is used.
>
> I want to investigate and experiment with both the item-item and
> user-item recommenders in Mahout.
> The problem I have is that I'm having a hard time finding a good
> overview of the capabilities of the various algorithms.
> Most Wikipedia articles immediately dive into the underlying
> mathematical foundations instead of the practical implications I'm
> looking for.
> I've also not been able to find what I'm looking for in the Mahout
> Wiki/Confluence.
>
> Putting it simply I'm looking for a comprehensive overview of
> - the kind of things you can and cannot do with the various algorithms
> that are available in Mahout.
>    - can it handle both "Implicit" and "Explicit" ratings.
>    - can I 'age' the relevance of the (implicit) ratings? I.e.
> Recommendations should change with the changing taste.
>    - how does it handle in long tail situations (with millions of
> items most are only viewed/rated very infrequently)
> - what are the scaling properties of the algorithms.
>    - is it always batch or can I do real-time incremental updates
> with new ratings?
>    - can I preprocess a daily dataset and then combine the daily sets
> into "what I need"?
>
> Thanks for any info you can point me to.
>
> --
> Best regards,
>
> Niels Basjes
>



-- 
Niall Riddell
*xSpace Analytics Ltd*
*
------------------------------------------------------------------------------------------------------------
*
T: +44 161 408 3830
M:+44 778 696 3830
Skype: niall.riddell
*
------------------------------------------------------------------------------------------------------------
*

Re: Need some pointers towards algorithm capabilities.

Posted by Sean Owen <sr...@gmail.com>.
On Thu, Dec 16, 2010 at 4:28 PM, Niels Basjes <Ni...@basjes.nl> wrote:
>
> The dataset size really huge. I'm currently looking up against >5M
> items, >2M users and several millions of "item views" per day.
> All of those dimensions are growing.
> Can the non-distributed way handle that kind of volume?
>

"It depends", but, my rule of thumb is that you can probably fit 100M
user-item associations on one reasonable modern server machine. After that
you are needing 8, 16, 32 GB of RAM to keep scaling. It's possible but gets
expensive. Distributed is the answer after about 100M associations.

The other big piece of advice to give at this stage is: can you prune? Even
if you have 1B associations, it's possible 90% of that data can be usefully
ignored. How you choose that is another question unto itself.



>
> > For Hadoop there is an item-based recommender with pluggable similarity
> > metrics.
> > For non-distributed there's much more.
>
> Is there an overview? ... or is that in your book?
>

Overview of the non-distributed bit? The book does cover it yes but I think
you can easily see what's out there by looking up implementations of
Recommender from the IDE. Skimming the javadoc ought to do a lot to
summarize what's out there.


>
> > For example a user-based or item-based
> > recommender with log-likelihood similarity, or an SVD-based recommender,
> > doesn't suffer as much from these issues.
>
> Ok .... you just lost this newbie ...
>

Hehe maybe the book would be useful.


>
> > The distributed version is necessarily batch -- it's Hadoop after all.
> > The non-distributed version is all real-time, incremental updates.
>
> Can the incremental versions handle the volume I mentioned?
>

Non-distributed? Right now it sounds like you have < 100M associations so
yeah you can get away with an in-memory instance and those can be updated in
real time. Again the algorithms vary a lot in terms of how fast they can
update.


I've seen that in some cases of "large volume processing" it pays to
> do part of the processing per "day" of input data and aggregate over
> the whole period. As I have almost no understanding of the kind of
> algorithms used here this remark of mine could very well be
> meaningless here.
>
>
For recommenders no it doesn't quite work like that.

But for large scale, in general, you'll be doing big batch computations
every hour or day or whatever, and then use other means to incorporate new
information instantly, but imperfectly, into the recommendations. That is
you will find you have to do both a batch and real-time piece and integrate
them to really do this properly at scale -- unless it's OK that new data
takes a while to incorporate, rather than more or less instantly.

This is harder and is something I am working on separately myself.

Re: Need some pointers towards algorithm capabilities.

Posted by Niels Basjes <Ni...@basjes.nl>.
Hi,

2010/12/16 Sean Owen <sr...@gmail.com>:
> This should address much of that:
> https://cwiki.apache.org/confluence/display/MAHOUT/Recommender+Documentation
> As does the book yes.

Thanks. I already found the book. I think I should get it. :)

> The answer also depends on whether you want a Hadoop-based job, for which
> there is not much written yet, or the more mature non-distributed version.

The dataset size really huge. I'm currently looking up against >5M
items, >2M users and several millions of "item views" per day.
All of those dimensions are growing.
Can the non-distributed way handle that kind of volume?

> For Hadoop there is an item-based recommender with pluggable similarity
> metrics.
> For non-distributed there's much more.

Is there an overview? ... or is that in your book?

> Explicit vs implicit ratings and factoring in time are "out of scope" -- you
> can collect data however you want and adjust it however you want. What
> matters is what's fed into the framework. So the answer is, yes, that's
> supported just fine, but not within the framework itself.

This information really helps me! Thanks.

> Long-tail issues are fine if you choose the right algorithms, and they are
> going to vary a lot in this regard.

That's what I would expect.

> For example a user-based or item-based
> recommender with log-likelihood similarity, or an SVD-based recommender,
> doesn't suffer as much from these issues.

Ok .... you just lost this newbie ...

> The distributed version is necessarily batch -- it's Hadoop after all.
> The non-distributed version is all real-time, incremental updates.

Can the incremental versions handle the volume I mentioned?

> I am not sure what you mean by preprocessing daily data sets?

I've seen that in some cases of "large volume processing" it pays to
do part of the processing per "day" of input data and aggregate over
the whole period. As I have almost no understanding of the kind of
algorithms used here this remark of mine could very well be
meaningless here.

Niels Basjes

> On Thu, Dec 16, 2010 at 10:35 AM, Niels Basjes <Ni...@basjes.nl> wrote:
>
>> Hi,
>>
>> I'm an experienced developer yet a complete newbie when it comes to
>> the type of functionality Mahout offers.
>> I do have some experience in designing and writing MapReduce jobs in
>> Hadoop so I understand enough of the base platform that is used.
>>
>> I want to investigate and experiment with both the item-item and
>> user-item recommenders in Mahout.
>> The problem I have is that I'm having a hard time finding a good
>> overview of the capabilities of the various algorithms.
>> Most Wikipedia articles immediately dive into the underlying
>> mathematical foundations instead of the practical implications I'm
>> looking for.
>> I've also not been able to find what I'm looking for in the Mahout
>> Wiki/Confluence.
>>
>> Putting it simply I'm looking for a comprehensive overview of
>> - the kind of things you can and cannot do with the various algorithms
>> that are available in Mahout.
>>    - can it handle both "Implicit" and "Explicit" ratings.
>>    - can I 'age' the relevance of the (implicit) ratings? I.e.
>> Recommendations should change with the changing taste.
>>    - how does it handle in long tail situations (with millions of
>> items most are only viewed/rated very infrequently)
>> - what are the scaling properties of the algorithms.
>>    - is it always batch or can I do real-time incremental updates
>> with new ratings?
>>    - can I preprocess a daily dataset and then combine the daily sets
>> into "what I need"?
>>
>> Thanks for any info you can point me to.
>>
>> --
>> Best regards,
>>
>> Niels Basjes
>>
>



-- 
Met vriendelijke groeten,

Niels Basjes

Re: Need some pointers towards algorithm capabilities.

Posted by Sean Owen <sr...@gmail.com>.
This should address much of that:
https://cwiki.apache.org/confluence/display/MAHOUT/Recommender+Documentation
As does the book yes.

The answer also depends on whether you want a Hadoop-based job, for which
there is not much written yet, or the more mature non-distributed version.

For Hadoop there is an item-based recommender with pluggable similarity
metrics.
For non-distributed there's much more.

Explicit vs implicit ratings and factoring in time are "out of scope" -- you
can collect data however you want and adjust it however you want. What
matters is what's fed into the framework. So the answer is, yes, that's
supported just fine, but not within the framework itself.

Long-tail issues are fine if you choose the right algorithms, and they are
going to vary a lot in this regard. For example a user-based or item-based
recommender with log-likelihood similarity, or an SVD-based recommender,
doesn't suffer as much from these issues.

The distributed version is necessarily batch -- it's Hadoop after all.
The non-distributed version is all real-time, incremental updates.

I am not sure what you mean by preprocessing daily data sets?

On Thu, Dec 16, 2010 at 10:35 AM, Niels Basjes <Ni...@basjes.nl> wrote:

> Hi,
>
> I'm an experienced developer yet a complete newbie when it comes to
> the type of functionality Mahout offers.
> I do have some experience in designing and writing MapReduce jobs in
> Hadoop so I understand enough of the base platform that is used.
>
> I want to investigate and experiment with both the item-item and
> user-item recommenders in Mahout.
> The problem I have is that I'm having a hard time finding a good
> overview of the capabilities of the various algorithms.
> Most Wikipedia articles immediately dive into the underlying
> mathematical foundations instead of the practical implications I'm
> looking for.
> I've also not been able to find what I'm looking for in the Mahout
> Wiki/Confluence.
>
> Putting it simply I'm looking for a comprehensive overview of
> - the kind of things you can and cannot do with the various algorithms
> that are available in Mahout.
>    - can it handle both "Implicit" and "Explicit" ratings.
>    - can I 'age' the relevance of the (implicit) ratings? I.e.
> Recommendations should change with the changing taste.
>    - how does it handle in long tail situations (with millions of
> items most are only viewed/rated very infrequently)
> - what are the scaling properties of the algorithms.
>    - is it always batch or can I do real-time incremental updates
> with new ratings?
>    - can I preprocess a daily dataset and then combine the daily sets
> into "what I need"?
>
> Thanks for any info you can point me to.
>
> --
> Best regards,
>
> Niels Basjes
>