class ChiSqSelectorModel extends VectorTransformer with Saveable
Chi Squared selector model.
- Annotations
- @Since( "1.3.0" )
- Source
- ChiSqSelector.scala
- Alphabetic
- By Inheritance
- ChiSqSelectorModel
- Saveable
- VectorTransformer
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
ChiSqSelectorModel(selectedFeatures: Array[Int])
- selectedFeatures
list of indices to select (filter).
- Annotations
- @Since( "1.3.0" )
Value Members
-
def
save(sc: SparkContext, path: String): Unit
Save this model to the given path.
Save 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
.- sc
Spark context used to save model data.
- path
Path specifying the directory in which to save this model. If the directory already exists, this method throws an exception.
- Definition Classes
- ChiSqSelectorModel → Saveable
- Annotations
- @Since( "1.6.0" )
-
val
selectedFeatures: Array[Int]
- Annotations
- @Since( "1.3.0" )
-
def
transform(vector: Vector): Vector
Applies transformation on a vector.
Applies transformation on a vector.
- vector
vector to be transformed.
- returns
transformed vector.
- Definition Classes
- ChiSqSelectorModel → VectorTransformer
- Annotations
- @Since( "1.3.0" )
-
def
transform(data: JavaRDD[Vector]): JavaRDD[Vector]
Applies transformation on a JavaRDD[Vector].
Applies transformation on a JavaRDD[Vector].
- data
JavaRDD[Vector] to be transformed.
- returns
transformed JavaRDD[Vector].
- Definition Classes
- VectorTransformer
- Annotations
- @Since( "1.1.0" )
-
def
transform(data: RDD[Vector]): RDD[Vector]
Applies transformation on an RDD[Vector].
Applies transformation on an RDD[Vector].
- data
RDD[Vector] to be transformed.
- returns
transformed RDD[Vector].
- Definition Classes
- VectorTransformer
- Annotations
- @Since( "1.1.0" )