Package org.apache.spark.ml.feature
Class MinHashLSHModel
Object
org.apache.spark.ml.PipelineStage
org.apache.spark.ml.Transformer
org.apache.spark.ml.Model<T>
org.apache.spark.ml.feature.LSHModel<MinHashLSHModel>
org.apache.spark.ml.feature.MinHashLSHModel
- All Implemented Interfaces:
Serializable,org.apache.spark.internal.Logging,org.apache.spark.ml.feature.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.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.apache.spark.internal.Logging
org.apache.spark.internal.Logging.LogStringContext, org.apache.spark.internal.Logging.SparkShellLoggingFilter -
Method Summary
Modifier and TypeMethodDescriptionCreates a copy of this instance with the same UID and some extra params.static MinHashLSHModelstatic MLReader<MinHashLSHModel>read()setInputCol(String value) setOutputCol(String value) toString()uid()An immutable unique ID for the object and its derivatives.write()Returns anMLWriterinstance for this ML instance.Methods inherited from class org.apache.spark.ml.feature.LSHModel
approxNearestNeighbors, approxNearestNeighbors, approxNearestNeighbors, approxSimilarityJoin, approxSimilarityJoin, getInputCol, getNumHashTables, getOutputCol, inputCol, numHashTables, org$apache$spark$ml$feature$LSHParams$_setter_$numHashTables_$eq, org$apache$spark$ml$param$shared$HasInputCol$_setter_$inputCol_$eq, org$apache$spark$ml$param$shared$HasOutputCol$_setter_$outputCol_$eq, outputCol, save, transform, transformSchema, validateAndTransformSchemaMethods inherited from class org.apache.spark.ml.Transformer
transform, transform, transformMethods inherited from class org.apache.spark.ml.PipelineStage
paramsMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.spark.internal.Logging
initializeForcefully, initializeLogIfNecessary, initializeLogIfNecessary, initializeLogIfNecessary$default$2, isTraceEnabled, log, logBasedOnLevel, logDebug, logDebug, logDebug, logDebug, logError, logError, logError, logError, logInfo, logInfo, logInfo, logInfo, logName, LogStringContext, logTrace, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, logWarning, MDC, org$apache$spark$internal$Logging$$log_, org$apache$spark$internal$Logging$$log__$eq, withLogContextMethods inherited from interface org.apache.spark.ml.param.Params
clear, copyValues, defaultCopy, defaultParamMap, estimateMatadataSize, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, onParamChange, paramMap, params, set, set, set, setDefault, setDefault, shouldOwn
-
Method Details
-
read
-
load
-
uid
Description copied from interface:IdentifiableAn immutable unique ID for the object and its derivatives.- Returns:
- (undocumented)
-
setInputCol
- Overrides:
setInputColin classorg.apache.spark.ml.feature.LSHModel<MinHashLSHModel>
-
setOutputCol
- Overrides:
setOutputColin classorg.apache.spark.ml.feature.LSHModel<MinHashLSHModel>
-
copy
Description copied from interface:ParamsCreates a copy of this instance with the same UID and some extra params. Subclasses should implement this method and set the return type properly. SeedefaultCopy().- Specified by:
copyin interfaceParams- Specified by:
copyin classModel<MinHashLSHModel>- Parameters:
extra- (undocumented)- Returns:
- (undocumented)
-
write
Description copied from interface:MLWritableReturns anMLWriterinstance for this ML instance.- Returns:
- (undocumented)
-
toString
- Specified by:
toStringin interfaceIdentifiable- Overrides:
toStringin classObject
-