public class KBinsDiscretizerModel extends Object implements Model<KBinsDiscretizerModel>, KBinsDiscretizerModelParams<KBinsDiscretizerModel>
KBinsDiscretizer
.
A feature value `v` should be mapped to a bin with edges as `{left, right}` if `v` is in `[left, right)`. If `v` does not fall into any of the bins, it is mapped to the closest bin. For example suppose the bin edges are `{-1, 0, 1}` for one column, then we have two bins `{-1, 0}` and `{0, 1}`. In this case, -2 is mapped into 0-th bin, 0 is mapped into the 1-st bin and 2 is mapped into the 1-st bin.
INPUT_COL
OUTPUT_COL
Constructor and Description |
---|
KBinsDiscretizerModel() |
Modifier and Type | Method and Description |
---|---|
org.apache.flink.table.api.Table[] |
getModelData()
Gets a list of tables representing the model data.
|
Map<Param<?>,Object> |
getParamMap()
Returns a map which should contain value for every parameter that meets one of the following
conditions.
|
static KBinsDiscretizerModel |
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.
|
KBinsDiscretizerModel |
setModelData(org.apache.flink.table.api.Table... inputs)
Sets model data using the given list of tables.
|
org.apache.flink.table.api.Table[] |
transform(org.apache.flink.table.api.Table... inputs)
Applies the AlgoOperator on the given input tables and returns the result tables.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
get, getParam, set
getInputCol, setInputCol
getOutputCol, setOutputCol
public org.apache.flink.table.api.Table[] transform(org.apache.flink.table.api.Table... inputs)
AlgoOperator
transform
in interface AlgoOperator<KBinsDiscretizerModel>
inputs
- a list of tablespublic KBinsDiscretizerModel setModelData(org.apache.flink.table.api.Table... inputs)
Model
setModelData
in interface Model<KBinsDiscretizerModel>
inputs
- a list of tablespublic org.apache.flink.table.api.Table[] getModelData()
Model
getModelData
in interface Model<KBinsDiscretizerModel>
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<KBinsDiscretizerModel>
public void save(String path) throws IOException
Stage
save
in interface Stage<KBinsDiscretizerModel>
IOException
public static KBinsDiscretizerModel 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.