Re: Persisting MatrixFactorizationModel

2013-12-05 Thread Aslan Bekirov
Thanks a lot Evan... On Wed, Dec 4, 2013 at 8:31 PM, Evan R. Sparks wrote: > Ah, actually - I just remembered that the user and product features of the > model are RDDs, so - you might be better off saving those components to > HDFS and then at load time reading them back in and creating a new

Re: Persisting MatrixFactorizationModel

2013-12-04 Thread Evan R. Sparks
Ah, actually - I just remembered that the user and product features of the model are RDDs, so - you might be better off saving those components to HDFS and then at load time reading them back in and creating a new MatrixFactorizationModel. Sorry for the confusion! Note, the above solution only wo

Re: Persisting MatrixFactorizationModel

2013-12-04 Thread Aslan Bekirov
I thought to convert model to RDD and save to HDFS, and then load it. I will try your method. Thanks a lot. On Wed, Dec 4, 2013 at 7:41 PM, Evan R. Sparks wrote: > The model is serializable - so you should be able to write it out to disk > and load it up in another program. > > See, e.g. - htt

Re: Persisting MatrixFactorizationModel

2013-12-04 Thread Evan R. Sparks
The model is serializable - so you should be able to write it out to disk and load it up in another program. See, e.g. - https://gist.github.com/ramn/5566596 (Note, I haven't tested this particular example, but it looks alright). Spark makes use of this type of scala (and kryo, etc.) serializatio

Persisting MatrixFactorizationModel

2013-12-04 Thread Aslan Bekirov
Hi All, I am creating a model by calling train method of ALS. val model = ALS.train(ratings.) I need to persist this model. Use it from different clients, enable clients to make predictions using this model. In other words, persist and reload this model. Any suggestions, please? BR, Aslan