You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mahout.apache.org by Chris Newell <ch...@rd.bbc.co.uk> on 2011/03/29 12:23:14 UTC
AbstractFactorizer is not currently refreshable
AbstractFactorizer (in package
org.apache.mahout.cf.taste.impl.recommender.svd) does not currently
implement refreshable. This makes it difficult to implement refresh in
SVDRecommender (currently a "ToDo" which I'd like to fix).
There are two options I can see:
1) remember which Factorizer Class has been used in SVDRecommender and
create a new instance when you call refresh
2) make AbstractFactorizer implement Refreshable
I would prefer option 2 but this would require minor changes to one of
the existing sub-classes (ExpectationMaximizationSVDFactorizer - some
code would have to be moved from the constructor to the factorize method).
Does anyone else have a preference or see a better option?
Chris
Re: AbstractFactorizer is not currently refreshable
Posted by Sebastian Schelter <ss...@apache.org>.
Good point! Hadn't thought about that, than we should make Factorizer
implement Refreshable as you proposed.
--sebastian
On 29.03.2011 14:12, Chris Newell wrote:
> Sebastian,
>> Would it not be easier to just have SVDRecommender refresh the
>> DataModel first and then just make it recompute the factorization?
>
> The problem is that when the DataModel is refreshed the userIDMapping
> and itemIDMapping in the Factorizer also need to be refreshed and I
> don't think this is currently possible (unless we take option 1)
>
> Chris
>
>> On 29.03.2011 12:23, Chris Newell wrote:
>>> AbstractFactorizer (in package
>>> org.apache.mahout.cf.taste.impl.recommender.svd) does not currently
>>> implement refreshable. This makes it difficult to implement refresh in
>>> SVDRecommender (currently a "ToDo" which I'd like to fix).
>>>
>>> There are two options I can see:
>>>
>>> 1) remember which Factorizer Class has been used in SVDRecommender and
>>> create a new instance when you call refresh
>>>
>>> 2) make AbstractFactorizer implement Refreshable
>>>
>>> I would prefer option 2 but this would require minor changes to one of
>>> the existing sub-classes (ExpectationMaximizationSVDFactorizer - some
>>> code would have to be moved from the constructor to the factorize
>>> method).
>>>
>>> Does anyone else have a preference or see a better option?
>>>
>>> Chris
>>>
>
>
Re: AbstractFactorizer is not currently refreshable
Posted by Chris Newell <ch...@rd.bbc.co.uk>.
Sebastian,
> Would it not be easier to just have SVDRecommender refresh the
> DataModel first and then just make it recompute the factorization?
The problem is that when the DataModel is refreshed the userIDMapping
and itemIDMapping in the Factorizer also need to be refreshed and I
don't think this is currently possible (unless we take option 1)
Chris
> On 29.03.2011 12:23, Chris Newell wrote:
>> AbstractFactorizer (in package
>> org.apache.mahout.cf.taste.impl.recommender.svd) does not currently
>> implement refreshable. This makes it difficult to implement refresh in
>> SVDRecommender (currently a "ToDo" which I'd like to fix).
>>
>> There are two options I can see:
>>
>> 1) remember which Factorizer Class has been used in SVDRecommender and
>> create a new instance when you call refresh
>>
>> 2) make AbstractFactorizer implement Refreshable
>>
>> I would prefer option 2 but this would require minor changes to one of
>> the existing sub-classes (ExpectationMaximizationSVDFactorizer - some
>> code would have to be moved from the constructor to the factorize
>> method).
>>
>> Does anyone else have a preference or see a better option?
>>
>> Chris
>>
--
_______________________
*Chris Newell*
Lead Technologist
Audience Experience
*BBC R & D South Lab*
BBC Centre House
*Tel:* +44 (0)303 040 9747
*Fax:* +44 (0)208 811 8815
*Email:* chris.newell@rd.bbc.co.uk
Re: AbstractFactorizer is not currently refreshable
Posted by Sebastian Schelter <ss...@apache.org>.
Hi Chris,
Nice to see you take that task. Could you open a JIRA issue for it?
Would it not be easier to just have SVDRecommender refresh the DataModel
first and then just make it recompute the factorization?
--sebastian
On 29.03.2011 12:23, Chris Newell wrote:
> AbstractFactorizer (in package
> org.apache.mahout.cf.taste.impl.recommender.svd) does not currently
> implement refreshable. This makes it difficult to implement refresh in
> SVDRecommender (currently a "ToDo" which I'd like to fix).
>
> There are two options I can see:
>
> 1) remember which Factorizer Class has been used in SVDRecommender and
> create a new instance when you call refresh
>
> 2) make AbstractFactorizer implement Refreshable
>
> I would prefer option 2 but this would require minor changes to one of
> the existing sub-classes (ExpectationMaximizationSVDFactorizer - some
> code would have to be moved from the constructor to the factorize method).
>
> Does anyone else have a preference or see a better option?
>
> Chris
>