-
- Downloads
[SPARK-17747][ML] WeightCol support non-double numeric datatypes
## What changes were proposed in this pull request? 1, add test for `WeightCol` in `MLTestingUtils.checkNumericTypes` 2, move datatype cast to `Predict.fit`, and supply algos' `train()` with casted dataframe ## How was this patch tested? local tests in spark-shell and unit tests Author: Zheng RuiFeng <ruifengz@foxmail.com> Closes #15314 from zhengruifeng/weightCol_support_int.
Showing
- mllib/src/main/scala/org/apache/spark/ml/Predictor.scala 27 additions, 5 deletionsmllib/src/main/scala/org/apache/spark/ml/Predictor.scala
- mllib/src/main/scala/org/apache/spark/ml/regression/IsotonicRegression.scala 3 additions, 6 deletions...a/org/apache/spark/ml/regression/IsotonicRegression.scala
- mllib/src/test/scala/org/apache/spark/ml/PredictorSuite.scala 17 additions, 9 deletions...b/src/test/scala/org/apache/spark/ml/PredictorSuite.scala
- mllib/src/test/scala/org/apache/spark/ml/classification/LogisticRegressionSuite.scala 1 addition, 1 deletion...che/spark/ml/classification/LogisticRegressionSuite.scala
- mllib/src/test/scala/org/apache/spark/ml/classification/NaiveBayesSuite.scala 3 additions, 3 deletions.../org/apache/spark/ml/classification/NaiveBayesSuite.scala
- mllib/src/test/scala/org/apache/spark/ml/regression/GeneralizedLinearRegressionSuite.scala 1 addition, 1 deletion...park/ml/regression/GeneralizedLinearRegressionSuite.scala
- mllib/src/test/scala/org/apache/spark/ml/regression/IsotonicRegressionSuite.scala 1 addition, 1 deletion.../apache/spark/ml/regression/IsotonicRegressionSuite.scala
- mllib/src/test/scala/org/apache/spark/ml/regression/LinearRegressionSuite.scala 1 addition, 1 deletion...rg/apache/spark/ml/regression/LinearRegressionSuite.scala
- mllib/src/test/scala/org/apache/spark/ml/util/MLTestingUtils.scala 41 additions, 11 deletions.../test/scala/org/apache/spark/ml/util/MLTestingUtils.scala
Loading
Please register or sign in to comment