public class StandardScaler extends Object implements Estimator<StandardScaler,StandardScalerModel>, StandardScalerParams<StandardScaler>
Standardization is a common requirement for machine learning training because they may behave badly if the individual features of an input do not look like standard normally distributed data (e.g. Gaussian with 0 mean and unit variance).
This estimator standardizes the input features by removing the mean and scaling each dimension to unit variance.
WITH_MEAN, WITH_STD
INPUT_COL
OUTPUT_COL
Constructor and Description |
---|
StandardScaler() |
Modifier and Type | Method and Description |
---|---|
StandardScalerModel |
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 StandardScaler |
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
getWithMean, getWithStd, setWithMean, setWithStd
getInputCol, setInputCol
getOutputCol, setOutputCol
get, getParam, set
public StandardScalerModel fit(org.apache.flink.table.api.Table... inputs)
Estimator
fit
in interface Estimator<StandardScaler,StandardScalerModel>
inputs
- a list of tablespublic void save(String path) throws IOException
Stage
save
in interface Stage<StandardScaler>
IOException
public static StandardScaler load(org.apache.flink.table.api.bridge.java.StreamTableEnvironment tEnv, String path) throws IOException
IOException
public 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<StandardScaler>
Copyright © 2019–2023 The Apache Software Foundation. All rights reserved.