Github user mengxr commented on the pull request:
https://github.com/apache/spark/pull/1484#issuecomment-51024568
Sure. We had some transformers implemented under `mllib.feature`, similar
to sk-learn's approach. For feature selection, we can follow the same approach
if we view feature selection as transformation: 1) fit a dataset and select a
subset of features, 2) transform a dataset by picking out selected features. So
for the API, I suggest the following
~~~
class ChiSquaredFeatureSelector(numFeatures: Int) extends Serializable {
def fit(dataset: RDD[LabeledPoint]): this.type
def transform(dataset: RDD[LabeledPoint]): RDD[LabeledPoint]
}
~~~
and we can hide the implementation from public interfaces. Please let me
know whether this sounds good to you.
---
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]