Github user mengxr commented on a diff in the pull request:
https://github.com/apache/spark/pull/597#discussion_r12334664
--- Diff:
examples/src/main/scala/org/apache/spark/examples/mllib/MovieLensALS.scala ---
@@ -99,7 +107,12 @@ object MovieLensALS {
val splits = ratings.randomSplit(Array(0.8, 0.2))
val training = splits(0).cache()
- val test = splits(1).cache()
+ val test = if (params.implicitPrefs) {
+ splits(1)
+ .map(x => Rating(x.user, x.product, if(x.rating >= 0) 1.0 else 0.0))
--- End diff --
`if(x.rating >= 0)` => `if (x.rating > 2.5)`. So ratings 3/4/5 are positive
and 1/2 are negative.
Does this line fit the one above?
---
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.
---