You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by jamborta <ja...@gmail.com> on 2014/11/25 17:26:12 UTC

why MatrixFactorizationModel private?

Hi all,

seems that all the mllib models are declared accessible in the package,
except MatrixFactorizationModel, which is declared private to mllib. Any
reason why?

thanks,



--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/why-MatrixFactorizationModel-private-tp19763.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

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


Re: why MatrixFactorizationModel private?

Posted by jamborta <ja...@gmail.com>.
many thanks for adding this so quickly.



--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/why-MatrixFactorizationModel-private-tp19763p19855.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

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


Re: why MatrixFactorizationModel private?

Posted by Xiangrui Meng <me...@gmail.com>.
Sent out a PR to make the constructor public and leave a note in the
doc: https://github.com/apache/spark/pull/3459 . If you load
userFeatures and productFeatures back and want to make predictions on
individual records, it might be useful to call
partitionBy(...).cache() on the userFeatures and productFeatures
before constructing the model. -Xiangrui

On Tue, Nov 25, 2014 at 10:36 AM, jamborta <ja...@gmail.com> wrote:
> hi Xiangrui,
>
> thanks. that is a very useful feature.
>
> any suggestion on saving/loading the model in the meantime?
>
>
>
>
> --
> View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/why-MatrixFactorizationModel-private-tp19763p19783.html
> Sent from the Apache Spark User List mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
> For additional commands, e-mail: user-help@spark.apache.org
>

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


Re: why MatrixFactorizationModel private?

Posted by jamborta <ja...@gmail.com>.
hi Xiangrui,

thanks. that is a very useful feature.

any suggestion on saving/loading the model in the meantime?




--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/why-MatrixFactorizationModel-private-tp19763p19783.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

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


Re: why MatrixFactorizationModel private?

Posted by Xiangrui Meng <me...@gmail.com>.
Besides API stability concerns, models constructed directly from users
rather than returned by ALS may not work well. The userFeatures and
productFeatures are both with partitioners so we can perform quick
lookup for prediction. If you save userFeatures and productFeatures
and load them back, it is very likely the partitioning info is
missing. That being said, we will try to address model export/import
in v1.3: https://issues.apache.org/jira/browse/SPARK-4587 . -Xiangrui

On Tue, Nov 25, 2014 at 8:26 AM, jamborta <ja...@gmail.com> wrote:
> Hi all,
>
> seems that all the mllib models are declared accessible in the package,
> except MatrixFactorizationModel, which is declared private to mllib. Any
> reason why?
>
> thanks,
>
>
>
> --
> View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/why-MatrixFactorizationModel-private-tp19763.html
> Sent from the Apache Spark User List mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
> For additional commands, e-mail: user-help@spark.apache.org
>

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