public class OneHotEncoder extends Object implements Estimator<OneHotEncoder,OneHotEncoderModel>, OneHotEncoderParams<OneHotEncoder>
Data of selected input columns should be indexed numbers in order for OneHotEncoder to function correctly.
See https://en.wikipedia.org/wiki/One-hot.
DROP_LAST
INPUT_COLS
OUTPUT_COLS
ERROR_INVALID, HANDLE_INVALID, SKIP_INVALID
Constructor and Description |
---|
OneHotEncoder() |
Modifier and Type | Method and Description |
---|---|
OneHotEncoderModel |
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 OneHotEncoder |
load(org.apache.flink.streaming.api.environment.StreamExecutionEnvironment env,
String path) |
void |
save(String path)
Saves this stage to the given path.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDropLast, setDropLast
getInputCols, setInputCols
getOutputCols, setOutputCols
getHandleInvalid, setHandleInvalid
get, getParam, set
public OneHotEncoderModel fit(org.apache.flink.table.api.Table... inputs)
Estimator
fit
in interface Estimator<OneHotEncoder,OneHotEncoderModel>
inputs
- a list of tablespublic void save(String path) throws IOException
Stage
save
in interface Stage<OneHotEncoder>
IOException
public static OneHotEncoder load(org.apache.flink.streaming.api.environment.StreamExecutionEnvironment env, 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<OneHotEncoder>
Copyright © 2019–2023 The Apache Software Foundation. All rights reserved.