public class OnlineStandardScaler extends Object implements Estimator<OnlineStandardScaler,OnlineStandardScalerModel>, OnlineStandardScalerParams<OnlineStandardScaler>
StandardScaler
.
OnlineStandardScaler splits the input data by the user-specified window strategy (i.e., HasWindows
). For each window, it computes the mean and standard
deviation using the data seen so far (i.e., not only the data in the current window, but also the
history data). The model data generated by OnlineStandardScaler is a model stream. There is one
model data for each window.
During the inference phase (i.e., using OnlineStandardScalerModel
for prediction),
users could output the model version that is used for predicting each data point. Moreover,
HasMaxAllowedModelDelayMs
), which enforces to use a
relatively fresh model for prediction.
WINDOWS
WITH_MEAN, WITH_STD
INPUT_COL
OUTPUT_COL
MODEL_VERSION_COL
MAX_ALLOWED_MODEL_DELAY_MS
Constructor and Description |
---|
OnlineStandardScaler() |
Modifier and Type | Method and Description |
---|---|
OnlineStandardScalerModel |
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 OnlineStandardScaler |
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
getWindows, setWindows
getWithMean, getWithStd, setWithMean, setWithStd
getInputCol, setInputCol
getOutputCol, setOutputCol
get, getParam, set
getModelVersionCol, setModelVersionCol
getMaxAllowedModelDelayMs, setMaxAllowedModelDelayMs
public OnlineStandardScalerModel fit(org.apache.flink.table.api.Table... inputs)
Estimator
fit
in interface Estimator<OnlineStandardScaler,OnlineStandardScalerModel>
inputs
- a list of tablespublic void save(String path) throws IOException
Stage
save
in interface Stage<OnlineStandardScaler>
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<OnlineStandardScaler>
public static OnlineStandardScaler 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.