[
https://issues.apache.org/jira/browse/MAHOUT-667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13019857#comment-13019857
]
Sebastian Schelter commented on MAHOUT-667:
-------------------------------------------
I thought of something much less generic that is tied to the usecase:
{noformat}
public interface PersistanceStrategy {
Factorization load() throws IOException;
void maybePersist(Factorization factorization) throws IOException;
}
{noformat}
SVDRecommender would call load() in its constructor. If the result was null it
would recompute the factorization and call maybePersist(). maybePersist() would
also be called after a new factorization was computed at refresh time.
A default implementation of PersistanceStrategy would always return null for
load and never do anything in maybePersist(). Other implementations could load
and save the factorizations to the datastore/format of their choice.
Does this approach sound fitting to you?
> Persistent storage of factorizations in SVDRecommender
> ------------------------------------------------------
>
> Key: MAHOUT-667
> URL: https://issues.apache.org/jira/browse/MAHOUT-667
> Project: Mahout
> Issue Type: Improvement
> Components: Collaborative Filtering
> Affects Versions: 0.5
> Reporter: Chris Newell
> Assignee: Sean Owen
> Priority: Minor
> Fix For: 0.4
>
> Original Estimate: 336h
> Remaining Estimate: 336h
>
> As discussed previously (https://issues.apache.org/jira/browse/MAHOUT-640) it
> would be beneficial to provide a persistent storage mechanism for
> factorizations created by SVDRecommender (in package
> org.apache.mahout.cf.taste.impl.recommender.svd) as these can be time
> consuming to produce. It would also allow factorizations to be computed on
> one machine then distributed to other machines providing predictions,
> improving efficiency and scalability.
> Having a "persistence strategy" interface has been suggested that could be
> implemented as required. I'll try to post a outline proposal for discussion
> purposes in the next few days but any comments or suggestions would be very
> welcome.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira