mgaido91 commented on a change in pull request #25639: [SPARK-28933][ML] Reduce
unnecessary shuffle in ALS when initializing factors
URL: https://github.com/apache/spark/pull/25639#discussion_r319717603
##########
File path: mllib/src/main/scala/org/apache/spark/ml/recommendation/ALS.scala
##########
@@ -1229,16 +1229,19 @@ object ALS extends DefaultParamsReadable[ALS] with
Logging {
// elements distributed as Normal(0,1) and taking the absolute value, and
then normalizing.
// This appears to create factorizations that have a slightly better
reconstruction
// (<1%) compared picking elements uniformly at random in [0,1].
- inBlocks.map { case (srcBlockId, inBlock) =>
Review comment:
what about just `mapValues`?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]