GitHub user yanboliang opened a pull request:
https://github.com/apache/spark/pull/15277
[SPARK-17704][ML][MLlib] ChiSqSelector performance improvement.
## What changes were proposed in this pull request?
Several performance improvement for ```ChiSqSelector```:
1, Keep ```selectedFeatures``` ordered ascendent.
```ChiSqSelectorModel.transform``` need ```selectedFeatures``` ordered to
make prediction. We should sort it when training model rather than making
prediction, since users usually train model once and use the model to do
prediction multiple times.
2, When training ```fpr``` type ```ChiSqSelectorModel```, it's not
necessary to sort the ChiSq test result by statistic.
## How was this patch tested?
Existing unit tests.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/yanboliang/spark spark-17704
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/15277.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 #15277
----
commit 27e4710b6c64e09976f51cf21b0fd555ac4602b8
Author: Yanbo Liang <[email protected]>
Date: 2016-09-28T08:06:53Z
ChiSqSelector performance improvement.
----
---
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]