Serializable
, org.apache.spark.internal.Logging
, LSHParams
, Params
, HasInputCol
, HasOutputCol
, Identifiable
, MLWritable
Model produced by
MinHashLSH
, where multiple hash functions are stored. Each hash function is picked from the following family of hash functions, where a_i and b_i are randomly chosen integers less than prime:
h_i(x) = ((x \cdot a_i + b_i) \mod prime)
This hash family is approximately min-wise independent according to the reference.
Reference: Tom Bohman, Colin Cooper, and Alan Frieze. "Min-wise independent linear permutations." Electronic Journal of Combinatorics 7 (2000): R26.
param: randCoefficients Pairs of random coefficients. Each pair is used by one hash function.
org.apache.spark.internal.Logging.LogStringContext, org.apache.spark.internal.Logging.SparkShellLoggingFilter
Overloaded method for approxNearestNeighbors.
Given a large dataset and an item, approximately find at most k items which have the closest distance to the item.
Overloaded method for approxSimilarityJoin.
Join two datasets to approximately find all pairs of rows whose distance are smaller than the threshold.
Creates a copy of this instance with the same UID and some extra params.
Param for input column name.
Param for the number of hash tables used in LSH OR-amplification.
Param for output column name.
Transforms the input dataset.
Check transform validity and derive the output schema from the input schema.
An immutable unique ID for the object and its derivatives.
Returns an MLWriter
instance for this ML instance.
initializeForcefully, initializeLogIfNecessary, initializeLogIfNecessary, initializeLogIfNecessary$default$2, isTraceEnabled, log, logDebug, logDebug, logDebug, logDebug, logError, logError, logError, logError, logInfo, logInfo, logInfo, logInfo, logName, LogStringContext, logTrace, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, logWarning, org$apache$spark$internal$Logging$$log_, org$apache$spark$internal$Logging$$log__$eq, withLogContext
Methods inherited from interface org.apache.spark.ml.util.MLWritablesave
Methods inherited from interface org.apache.spark.ml.param.Paramsclear, copyValues, defaultCopy, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, onParamChange, paramMap, params, set, set, set, setDefault, setDefault, shouldOwn
An immutable unique ID for the object and its derivatives.
Params
Creates a copy of this instance with the same UID and some extra params. Subclasses should implement this method and set the return type properly. See defaultCopy()
.
copy
in interface Params
copy
in class Model<MinHashLSHModel>
extra
- (undocumented)
Returns an MLWriter
instance for this ML instance.
toString
in interface Identifiable
toString
in class Object
dataset
- The dataset to search for nearest neighbors of the key.
key
- Feature vector representing the item to search for.
numNearestNeighbors
- The maximum number of nearest neighbors.
distCol
- Output column for storing the distance between each result row and the key.
Overloaded method for approxNearestNeighbors. Use "distCol" as default distCol.
dataset
- (undocumented)
key
- (undocumented)
numNearestNeighbors
- (undocumented)
datasetA
- One of the datasets to join.
datasetB
- Another dataset to join.
threshold
- The threshold for the distance of row pairs.
distCol
- Output column for storing the distance between each pair of rows.
Overloaded method for approxSimilarityJoin. Use "distCol" as default distCol.
datasetA
- (undocumented)
datasetB
- (undocumented)
threshold
- (undocumented)
Param for input column name.
inputCol
in interface HasInputCol
LSH OR-amplification can be used to reduce the false negative rate. Higher values for this param lead to a reduced false negative rate, at the expense of added computational complexity.
numHashTables
in interface LSHParams
Param for output column name.
outputCol
in interface HasOutputCol
Transforms the input dataset.
transform
in class Transformer
dataset
- (undocumented)
Check transform validity and derive the output schema from the input schema.
We check validity for interactions between parameters during transformSchema
and raise an exception if any parameter value is invalid. Parameter value checks which do not depend on other parameters are handled by Param.validate()
.
Typical implementation should first conduct verification on schema change and parameter validity, including complex parameter interaction checks.
transformSchema
in class PipelineStage
schema
- (undocumented)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4