Github user mdagost commented on a diff in the pull request:
https://github.com/apache/spark/pull/3095#discussion_r19917467
--- Diff:
mllib/src/main/scala/org/apache/spark/mllib/api/python/PythonMLLibAPI.scala ---
@@ -278,8 +278,28 @@ class PythonMLLibAPI extends Serializable {
rank: Int,
iterations: Int,
lambda: Double,
- blocks: Int): MatrixFactorizationModel = {
- new MatrixFactorizationModelWrapper(ALS.train(ratings.rdd, rank,
iterations, lambda, blocks))
+ blocks: Int,
+ seed: Long,
--- End diff --
I'll move it to the end.
The issue is that it would be nice to preserve the nanosecond level time
seed that scala uses, but I couldn't find a way to do that directly in python
and just pass it through. So I created the extra stub to let scala do it
itself.
> On Nov 5, 2014, at 6:06 PM, Davies Liu <[email protected]> wrote:
>
> In
mllib/src/main/scala/org/apache/spark/mllib/api/python/PythonMLLibAPI.scala:
>
> > @@ -278,8 +278,28 @@ class PythonMLLibAPI extends Serializable {
> > rank: Int,
> > iterations: Int,
> > lambda: Double,
> > - blocks: Int): MatrixFactorizationModel = {
> > - new MatrixFactorizationModelWrapper(ALS.train(ratings.rdd, rank,
iterations, lambda, blocks))
> > + blocks: Int,
> > + seed: Long,
> We could use java.lang.Long for seed, then seed can be null (means not
specified), then we do not need another stub.
>
> Also, putting seed in the end may be better (seed is optional).
>
> â
> Reply to this email directly or view it on GitHub.
>
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]