-
- Downloads
[SPARK-19733][ML] Removed unnecessary castings and refactored checked casts in ALS.
## What changes were proposed in this pull request? The original ALS was performing unnecessary casting to the user and item ids because the protected checkedCast() method required a double. I removed the castings and refactored the method to receive Any and efficiently handle all permitted numeric values. ## How was this patch tested? I tested it by running the unit-tests and by manually validating the result of checkedCast for various legal and illegal values. Author: Vasilis Vryniotis <bbriniotis@datumbox.com> Closes #17059 from datumbox/als_casting_fix.
Showing
- mllib/src/main/scala/org/apache/spark/ml/recommendation/ALS.scala 20 additions, 11 deletions...c/main/scala/org/apache/spark/ml/recommendation/ALS.scala
- mllib/src/test/scala/org/apache/spark/ml/recommendation/ALSSuite.scala 75 additions, 9 deletions...t/scala/org/apache/spark/ml/recommendation/ALSSuite.scala
Loading
Please register or sign in to comment