org.apache.spark.mllib.feature
Class ChiSqSelector

Object
  extended by org.apache.spark.mllib.feature.ChiSqSelector
All Implemented Interfaces:
java.io.Serializable

public class ChiSqSelector
extends Object
implements scala.Serializable

:: Experimental :: Creates a ChiSquared feature selector. param: numTopFeatures number of features that selector will select (ordered by statistic value descending)

See Also:
Serialized Form

Constructor Summary
ChiSqSelector(int numTopFeatures)
           
 
Method Summary
 ChiSqSelectorModel fit(RDD<LabeledPoint> data)
          Returns a ChiSquared feature selector.
 int numTopFeatures()
           
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChiSqSelector

public ChiSqSelector(int numTopFeatures)
Method Detail

numTopFeatures

public int numTopFeatures()

fit

public ChiSqSelectorModel fit(RDD<LabeledPoint> data)
Returns a ChiSquared feature selector.

Parameters:
data - an RDD[LabeledPoint] containing the labeled dataset with categorical features. Real-valued features will be treated as categorical for each distinct value. Apply feature discretizer before using this function.
Returns:
(undocumented)