spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Evan R. Sparks" <evan.spa...@gmail.com>
Subject Re: Persisting MatrixFactorizationModel
Date Wed, 04 Dec 2013 17:41:25 GMT
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.) serialization
internally, so you can check the Spark codebase for more examples.


On Wed, Dec 4, 2013 at 9:34 AM, Aslan Bekirov <aslanbekirov@gmail.com>wrote:

> 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
>

Mime
View raw message