GitHub user yinxusen opened a pull request:
https://github.com/apache/spark/pull/10007
[SPARK-11987] Python API update for ChiSqSelector and QuantileDiscretizer
https://issues.apache.org/jira/browse/SPARK-11987
For `QuantileDiscretizer`, I add a `QuantileDiscretizerModel` in it as a
nested class. The reason is a `QuantileDiscretizer` generates a `Bucketizer`
mode, while the latter extends from a `JavaTransformer` in PySpark rather than
a `JavaModel`, which prevents us transfering java model to python model easily.
It also prevents us to call `_call_java("get_splits")` from outside since it is
a private method.
I tried to rewrite the `Bucketizer` into a `JavaModel` in the first time,
but it may hurt the current interfaces since `JavaModel` and `JavaTransformer`
have different ways to set `uid` and different construction method args
`__init__(...)`
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/yinxusen/spark SPARK-11987
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/10007.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 #10007
----
commit a11558ea329b174531e4f3c3e4d95f875fbc5f5d
Author: Xusen Yin <[email protected]>
Date: 2015-11-26T14:23:16Z
add QuantileDiscretizer in Python
commit 670821bd0adbb58483e453d1b220179659d254f3
Author: Xusen Yin <[email protected]>
Date: 2015-11-26T15:49:43Z
add ChiSqSelector in Python
commit 05f3eddcf38d9211f65f2af2227cb9b249955208
Author: Xusen Yin <[email protected]>
Date: 2015-11-26T15:54:02Z
add class exports
----
---
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]