GitHub user zhengruifeng opened a pull request:
https://github.com/apache/spark/pull/16171
[SPARK-18739][ML][PYSPARK] Models in pyspark.classification support
setXXXCol methods
## What changes were proposed in this pull request?
1, add `setFeaturesCol` and `setPredictionCol` in class
`JavaPredictionModel`
2, add `setRawPredictionCol` in class `JavaClassificationModel`
3, create class `JavaProbabilisticClassificationModel` inherit
`JavaClassificationModel`, and add `setProbabilityCol` in it
4, `LogisticRegressionModel`, `DecisionTreeClassificationModel`,
`RandomForestClassificationModel` and `NaiveBayesModel` inherit
`JavaProbabilisticClassificationModel`
5, `GBTClassificationModel` and `MultilayerPerceptronClassificationModel`
inherit `JavaClassificationModel`
6, `OneVsRestModel` inherit `JavaModel`, and add `setFeaturesCol` and
`setPredictionCol` method.
## How was this patch tested?
existing tests and added tests
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/zhengruifeng/spark py_clf_model_setcol
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/16171.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #16171
----
commit 37fedfd975bb38015df6b7f318667162d0d225f0
Author: Zheng RuiFeng <[email protected]>
Date: 2016-11-22T02:24:51Z
create pr
commit b9533f6ee0ac54e3a4922b10e25fe3580e831f90
Author: Zheng RuiFeng <[email protected]>
Date: 2016-11-22T09:19:43Z
add test
commit 44cdaa50aa9e263e534f782c4c0474edae0391d7
Author: Zheng RuiFeng <[email protected]>
Date: 2016-11-30T11:24:31Z
update version
commit e24169db76268bc847338e2b8790c03aa871da24
Author: Zheng RuiFeng <[email protected]>
Date: 2016-12-06T11:36:40Z
add ovrm
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]