-
- Downloads
[SPARK-20574][ML] Allow Bucketizer to handle non-Double numeric column
## What changes were proposed in this pull request? Bucketizer currently requires input column to be Double, but the logic should work on any numeric data types. Many practical problems have integer/float data types, and it could get very tedious to manually cast them into Double before calling bucketizer. This PR extends bucketizer to handle all numeric types. ## How was this patch tested? New test. Author: Wayne Zhang <actuaryzhang@uber.com> Closes #17840 from actuaryzhang/bucketizer.
Showing
- mllib/src/main/scala/org/apache/spark/ml/feature/Bucketizer.scala 2 additions, 2 deletions...c/main/scala/org/apache/spark/ml/feature/Bucketizer.scala
- mllib/src/test/scala/org/apache/spark/ml/feature/BucketizerSuite.scala 25 additions, 0 deletions...t/scala/org/apache/spark/ml/feature/BucketizerSuite.scala
Please register or sign in to comment