Package org.apache.spark.ml.feature
Class BucketedRandomProjectionLSHModel
Object
org.apache.spark.ml.PipelineStage
org.apache.spark.ml.Transformer
org.apache.spark.ml.Model<T>
org.apache.spark.ml.feature.LSHModel<BucketedRandomProjectionLSHModel>
org.apache.spark.ml.feature.BucketedRandomProjectionLSHModel
- All Implemented Interfaces:
Serializable,org.apache.spark.internal.Logging,org.apache.spark.ml.feature.BucketedRandomProjectionLSHParams,org.apache.spark.ml.feature.LSHParams,Params,HasInputCol,HasOutputCol,Identifiable,MLWritable
public class BucketedRandomProjectionLSHModel
extends org.apache.spark.ml.feature.LSHModel<BucketedRandomProjectionLSHModel>
implements org.apache.spark.ml.feature.BucketedRandomProjectionLSHParams
Model produced by
BucketedRandomProjectionLSH, where multiple random vectors are stored. The
vectors are normalized to be unit vectors and each vector is used in a hash function:
h_i(x) = floor(r_i.dot(x) / bucketLength)
where r_i is the i-th random unit vector. The number of buckets will be (max L2 norm of input
vectors) / bucketLength.
param: randMatrix A matrix with each row representing a 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.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.ml.feature.BucketedRandomProjectionLSHParams
getBucketLength, org$apache$spark$ml$feature$BucketedRandomProjectionLSHParams$_setter_$bucketLength_$eqMethods 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
-
bucketLength
- Specified by:
bucketLengthin interfaceorg.apache.spark.ml.feature.BucketedRandomProjectionLSHParams
-
uid
Description copied from interface:IdentifiableAn immutable unique ID for the object and its derivatives.- Specified by:
uidin interfaceIdentifiable- Returns:
- (undocumented)
-
setInputCol
- Overrides:
setInputColin classorg.apache.spark.ml.feature.LSHModel<BucketedRandomProjectionLSHModel>
-
setOutputCol
- Overrides:
setOutputColin classorg.apache.spark.ml.feature.LSHModel<BucketedRandomProjectionLSHModel>
-
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<BucketedRandomProjectionLSHModel>- Parameters:
extra- (undocumented)- Returns:
- (undocumented)
-
write
Description copied from interface:MLWritableReturns anMLWriterinstance for this ML instance.- Specified by:
writein interfaceMLWritable- Returns:
- (undocumented)
-
toString
- Specified by:
toStringin interfaceIdentifiable- Overrides:
toStringin classObject
-