You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by Scott Ryan <sr...@wayin.com> on 2011/11/08 00:50:29 UTC

How to refresh all components when loading an additional file for the data model to read

I have a user recommender and i am trying to use incremental file update.  I have the following stack

CachingRecommender
GenericBooleanPrefUserBasedRecommender
NearestNUserNeighborhood
CachingUserSimilarity
TanimotoCoefficientSimilarity
FileDataModel

I have the following file

sample-data.txt
sample-data.1.txt
sample-data.2.txt

I need to add sample-data.3.txt and understand how to insure all the components are refreshed.  I see the method takes an input but it is not clear what that input should be or if it can be null.

public void refresh(Collection<Refreshable> alreadyRefreshed)


So do I just call datamodel.refresh(null) and all the other components will be refreshed?

Thanks


Scott Ryan




Re: How to refresh all components when loading an additional file for the data model to read

Posted by Sean Owen <sr...@gmail.com>.
Yes just call with null.

On Mon, Nov 7, 2011 at 11:50 PM, Scott Ryan <sr...@wayin.com> wrote:

> I have a user recommender and i am trying to use incremental file update.
>  I have the following stack
>
> CachingRecommender
> GenericBooleanPrefUserBasedRecommender
> NearestNUserNeighborhood
> CachingUserSimilarity
> TanimotoCoefficientSimilarity
> FileDataModel
>
> I have the following file
>
> sample-data.txt
> sample-data.1.txt
> sample-data.2.txt
>
> I need to add sample-data.3.txt and understand how to insure all the
> components are refreshed.  I see the method takes an input but it is not
> clear what that input should be or if it can be null.
>
> public void refresh(Collection<Refreshable> alreadyRefreshed)
>
>
> So do I just call datamodel.refresh(null) and all the other components
> will be refreshed?
>
> Thanks
>
>
> Scott Ryan
>
>
>
>

Re: How to refresh all components when loading an additional file for the data model to read

Posted by deneche abdelhakim <ad...@gmail.com>.
Yes, but I believe you should call it in the caching recommender, this way
all depending elements will refresh themselves.

On Tue, Nov 8, 2011 at 12:50 AM, Scott Ryan <sr...@wayin.com> wrote:

> I have a user recommender and i am trying to use incremental file update.
>  I have the following stack
>
> CachingRecommender
> GenericBooleanPrefUserBasedRecommender
> NearestNUserNeighborhood
> CachingUserSimilarity
> TanimotoCoefficientSimilarity
> FileDataModel
>
> I have the following file
>
> sample-data.txt
> sample-data.1.txt
> sample-data.2.txt
>
> I need to add sample-data.3.txt and understand how to insure all the
> components are refreshed.  I see the method takes an input but it is not
> clear what that input should be or if it can be null.
>
> public void refresh(Collection<Refreshable> alreadyRefreshed)
>
>
> So do I just call datamodel.refresh(null) and all the other components
> will be refreshed?
>
> Thanks
>
>
> Scott Ryan
>
>
>
>