public class MinHashLSH extends Object implements MinHashLSHParams<MinHashLSH>
The input could be dense or sparse vectors. Each input vector must have at least one non-zero index and all non-zero values are treated as binary "1" values. The sizes of input vectors should be same and not larger than a predefined prime (i.e., 2038074743).
See: MinHash.
NUM_HASH_FUNCTIONS_PER_TABLE, NUM_HASH_TABLES
INPUT_COL
OUTPUT_COL
Constructor and Description |
---|
MinHashLSH() |
Modifier and Type | Method and Description |
---|---|
protected MinHashLSHModel |
createModel(org.apache.flink.streaming.api.datastream.DataStream<Integer> inputDim,
org.apache.flink.table.api.bridge.java.StreamTableEnvironment tEnv) |
M |
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 MinHashLSH |
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
getNumHashFunctionsPerTable, getNumHashTables, setNumHashFunctionsPerTable, setNumHashTables
getInputCol, setInputCol
getOutputCol, setOutputCol
get, getParam, getParamMap, set
protected MinHashLSHModel createModel(org.apache.flink.streaming.api.datastream.DataStream<Integer> inputDim, org.apache.flink.table.api.bridge.java.StreamTableEnvironment tEnv)
public static MinHashLSH load(org.apache.flink.table.api.bridge.java.StreamTableEnvironment tEnv, String path) throws IOException
IOException
public M fit(org.apache.flink.table.api.Table... inputs)
Estimator
public void save(String path) throws IOException
Stage
save
in interface Stage<E extends Estimator<E,M>>
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<E extends Estimator<E,M>>
Copyright © 2019–2023 The Apache Software Foundation. All rights reserved.