Package org.apache.spark.mllib.feature
Class ChiSqSelectorModel
Object
org.apache.spark.mllib.feature.ChiSqSelectorModel
- All Implemented Interfaces:
- Serializable,- VectorTransformer,- Saveable
Chi Squared selector model.
 
param: selectedFeatures list of indices to select (filter).
- See Also:
- 
Nested Class SummaryNested Classes
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic ChiSqSelectorModelload(SparkContext sc, String path) voidsave(SparkContext sc, String path) Save this model to the given path.int[]Applies transformation on a vector.Methods inherited from class java.lang.Objectequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.spark.mllib.feature.VectorTransformertransform, transform
- 
Constructor Details- 
ChiSqSelectorModelpublic ChiSqSelectorModel(int[] selectedFeatures) 
 
- 
- 
Method Details- 
load
- 
selectedFeaturespublic int[] selectedFeatures()
- 
transformApplies transformation on a vector.- Specified by:
- transformin interface- VectorTransformer
- Parameters:
- vector- vector to be transformed.
- Returns:
- transformed vector.
 
- 
saveDescription copied from interface:SaveableSave this model to the given path.This saves: - human-readable (JSON) model metadata to path/metadata/ - Parquet formatted data to path/data/ The model may be loaded using Loader.load.
 
-