public class Imputer extends Object implements Estimator<Imputer,ImputerModel>, ImputerParams<Imputer>
Missing values can be imputed using the statistics(mean, median or most frequent) of each column in which the missing values are located. The input columns should be of numeric type.
Note that the mean/median/most_frequent value is computed after filtering out missing values. All null values in the input columns are also treated as missing, and so are imputed.
MEAN, MEDIAN, MOST_FREQUENT, STRATEGY
RELATIVE_ERROR
MISSING_VALUE
INPUT_COLS
OUTPUT_COLS
Constructor and Description |
---|
Imputer() |
Modifier and Type | Method and Description |
---|---|
ImputerModel |
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 Imputer |
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
getStrategy, setStrategy
getRelativeError, setRelativeError
getMissingValue, setMissingValue
getInputCols, setInputCols
getOutputCols, setOutputCols
get, getParam, set
public ImputerModel fit(org.apache.flink.table.api.Table... inputs)
Estimator
fit
in interface Estimator<Imputer,ImputerModel>
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<Imputer>
public void save(String path) throws IOException
Stage
save
in interface Stage<Imputer>
IOException
public static Imputer 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.