Github user davideis commented on a diff in the pull request:
https://github.com/apache/spark/pull/18022#discussion_r117261995
--- Diff:
mllib/src/test/scala/org/apache/spark/ml/recommendation/ALSSuite.scala ---
@@ -348,6 +349,37 @@ class ALSSuite
}
/**
+ * Train ALS using the given training set and parameters
+ * @param training training dataset
+ * @param rank rank of the matrix factorization
+ * @param maxIter max number of iterations
+ * @param regParam regularization constant
+ * @param implicitPrefs whether to use implicit preference
+ * @param numUserBlocks number of user blocks
+ * @param numItemBlocks number of item blocks
+ * @return a trained ALSModel
+ */
+ def trainALS(
--- End diff --
It is a helper function, because I call it twice in the test. I also wanted
to use this in the testALS function, but it wasn't straightforward. I can't use
testALS in my test since it does more than just train the model and it doesn't
allow me to compare the two models the test generates, one with negative values
and one with those negative values zeroed out.
---
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]