[SPARK-21306][ML] OneVsRest should support setWeightCol
## What changes were proposed in this pull request? add `setWeightCol` method for OneVsRest. `weightCol` is ignored if classifier doesn't inherit HasWeightCol trait. ## How was this patch tested? + [x] add an unit test. Author: Yan Facai (颜发才) <facai.yan@gmail.com> Closes #18554 from facaiy/BUG/oneVsRest_missing_weightCol.
Showing
- mllib/src/main/scala/org/apache/spark/ml/classification/OneVsRest.scala 36 additions, 3 deletions.../scala/org/apache/spark/ml/classification/OneVsRest.scala
- mllib/src/test/scala/org/apache/spark/ml/classification/OneVsRestSuite.scala 10 additions, 0 deletions...a/org/apache/spark/ml/classification/OneVsRestSuite.scala
- python/pyspark/ml/classification.py 21 additions, 6 deletionspython/pyspark/ml/classification.py
- python/pyspark/ml/tests.py 14 additions, 0 deletionspython/pyspark/ml/tests.py
Loading
Please register or sign in to comment