I don't think MLlib supports model serialization/deserialization. You
got the error because the constructor is private. I created a JIRA for
this: https://issues.apache.org/jira/browse/SPARK-2488 and we try to
make sure it is implemented in v1.1. For now, you can modify the
KMeansModel and remove private[mllib] from the constructor. Sorry for
the inconvenience! -Xiangrui

On Mon, Jul 14, 2014 at 10:41 PM, Rohit Pujari <rpuj...@hortonworks.com> wrote:
> Hello Folks:
>
> I have written a simple program to read the already saved model from HDFS
> and score it. But when I'm trying to read the saved model, I get the
> following error. Any clues what might be going wrong here ..
>
>
> val x = sc.objectFile[Vector]("/data/model").collect()
> val y = new KMeansModel(x);
>
> constructor KMeansModel in class KMeansModel cannot be accessed in object
> KMeansScore
>     val y = new KMeansModel(x);
>             ^
>
> Thanks,
> Rohit
>
> CONFIDENTIALITY NOTICE
> NOTICE: This message is intended for the use of the individual or entity to
> which it is addressed and may contain information that is confidential,
> privileged and exempt from disclosure under applicable law. If the reader of
> this message is not the intended recipient, you are hereby notified that any
> printing, copying, dissemination, distribution, disclosure or forwarding of
> this communication is strictly prohibited. If you have received this
> communication in error, please contact the sender immediately and delete it
> from your system. Thank You.

Reply via email to