public class UnivariateFeatureSelector extends Object implements Estimator<UnivariateFeatureSelector,UnivariateFeatureSelectorModel>, UnivariateFeatureSelectorParams<UnivariateFeatureSelector>
Currently, Flink supports three Univariate Feature Selectors: chi-squared, ANOVA F-test and F-value. User can choose Univariate Feature Selector by setting `featureType` and `labelType`, and Flink will pick the score function based on the specified `featureType` and `labelType`.
The following combination of `featureType` and `labelType` are supported:
The `UnivariateFeatureSelector` supports different selection modes:
By default, the selection mode is `numTopFeatures`.
CATEGORICAL, CONTINUOUS, FDR, FEATURE_TYPE, FPR, FWE, LABEL_TYPE, NUM_TOP_FEATURES, PERCENTILE, SELECTION_MODE, SELECTION_THRESHOLD
LABEL_COL
FEATURES_COL
OUTPUT_COL
Constructor and Description |
---|
UnivariateFeatureSelector() |
Modifier and Type | Method and Description |
---|---|
UnivariateFeatureSelectorModel |
fit(org.apache.flink.table.api.Table... inputs)
Trains on the given inputs and produces a Model.
|
Map<Param<?>,Object> |
getParamMap()
Returns a map which should contain value for every parameter that meets one of the following
conditions.
|
static UnivariateFeatureSelector |
load(org.apache.flink.table.api.bridge.java.StreamTableEnvironment tEnv,
String path) |
void |
save(String path)
Saves the metadata and bounded data of this stage to the given path.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFeatureType, getLabelType, getSelectionMode, getSelectionThreshold, setFeatureType, setLabelType, setSelectionMode, setSelectionThreshold
getLabelCol, setLabelCol
getFeaturesCol, setFeaturesCol
getOutputCol, setOutputCol
get, getParam, set
public UnivariateFeatureSelectorModel fit(org.apache.flink.table.api.Table... inputs)
Estimator
fit
in interface Estimator<UnivariateFeatureSelector,UnivariateFeatureSelectorModel>
inputs
- a list of tablespublic Map<Param<?>,Object> getParamMap()
WithParams
1) set(...) has been called to set value for this parameter.
2) The parameter is a public final field of this WithParams instance. This includes fields inherited from its interfaces and super-classes.
The subclass which implements this interface could meet this requirement by returning a
member field of the given map type, after having initialized this member field using the
ParamUtils.initializeMapWithDefaultValues(Map, WithParams)
method.
getParamMap
in interface WithParams<UnivariateFeatureSelector>
public void save(String path) throws IOException
Stage
save
in interface Stage<UnivariateFeatureSelector>
IOException
public static UnivariateFeatureSelector load(org.apache.flink.table.api.bridge.java.StreamTableEnvironment tEnv, String path) throws IOException
IOException
Copyright © 2019–2023 The Apache Software Foundation. All rights reserved.