public class ChiSqSelectorModel extends Object implements VectorTransformer, Saveable
param: selectedFeatures list of indices to select (filter). Must be ordered asc
Modifier and Type | Class and Description |
---|---|
static class |
ChiSqSelectorModel.SaveLoadV1_0$ |
Constructor and Description |
---|
ChiSqSelectorModel(int[] selectedFeatures) |
Modifier and Type | Method and Description |
---|---|
static ChiSqSelectorModel |
load(SparkContext sc,
String path) |
void |
save(SparkContext sc,
String path)
Save this model to the given path.
|
int[] |
selectedFeatures() |
Vector |
transform(Vector vector)
Applies transformation on a vector.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
transform, transform
public static ChiSqSelectorModel load(SparkContext sc, String path)
public int[] selectedFeatures()
public Vector transform(Vector vector)
transform
in interface VectorTransformer
vector
- vector to be transformed.public void save(SparkContext sc, String path)
Saveable
This saves: - human-readable (JSON) model metadata to path/metadata/ - Parquet formatted data to path/data/
The model may be loaded using Loader.load
.