You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Jaonary Rabarisoa <ja...@gmail.com> on 2014/11/24 11:21:41 UTC
Store kmeans model
Dear all,
How can one save a kmeans model after training ?
Best,
Jao
Re: Store kmeans model
Posted by Xiangrui Meng <me...@gmail.com>.
KMeansModel is serializable. So you can use Java serialization, try
sc.parallelize(Seq(model)).saveAsObjectFile(outputDir)
sc.objectFile[KMeansModel](outputDir).first()
We will try to address model export/import more formally in 1.3, e.g.,
https://www.github.com/apache/spark/pull/3062
-Xiangrui
On Mon, Nov 24, 2014 at 2:21 AM, Jaonary Rabarisoa <ja...@gmail.com> wrote:
> Dear all,
>
> How can one save a kmeans model after training ?
>
>
> Best,
>
>
> Jao
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org