Re: Why the default Params.copy doesn't work for Model.copy?

2015-06-17 Thread Xiangrui Meng
That's is a bug, which will be fixed in
https://github.com/apache/spark/pull/6622. I disabled Model.copy
because models usually doesn't have a default constructor and hence
the default Params.copy implementation won't work. Unfortunately, due
to insufficient test coverage, StringIndexModel.copy is not
implemented. -Xiangrui

On Thu, Jun 4, 2015 at 10:09 PM, Justin Yip  wrote:
> Hello,
>
> I have a question with Spark 1.4 ml library. In the copy function, it is
> stated that the default implementation doesn't work of Params doesn't work
> for models.
> (https://github.com/apache/spark/blob/master/mllib/src/main/scala/org/apache/spark/ml/Model.scala#L49)
>
> As a result, some feature generation transformer like "StringIndexerModel"
> cannot be used in Pipeline.
>
> Maybe due to my limited knowledge in ML pipeline, can anyone give me some
> hints why Model.copy behaves differently as other Params?
>
> Thanks!
>
> Justin
>
> ________________
> View this message in context: Why the default Params.copy doesn't work for
> Model.copy?
> Sent from the Apache Spark User List mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
For additional commands, e-mail: user-h...@spark.apache.org



Why the default Params.copy doesn't work for Model.copy?

2015-06-04 Thread Justin Yip
Hello,

I have a question with Spark 1.4 ml library. In the copy function, it is
stated that the default implementation doesn't work of Params doesn't work
for models. (
https://github.com/apache/spark/blob/master/mllib/src/main/scala/org/apache/spark/ml/Model.scala#L49
)

As a result, some feature generation transformer like "StringIndexerModel"
cannot be used in Pipeline.

Maybe due to my limited knowledge in ML pipeline, can anyone give me some
hints why Model.copy behaves differently as other Params?

Thanks!

Justin




--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/Why-the-default-Params-copy-doesn-t-work-for-Model-copy-tp23169.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.