@Reference(type=Inproceedings, author="Charikar, Moses S.", title="Similarity estimation techniques from rounding algorithms", year="2002", booktitle="Proceedings of the thiry-fourth annual ACM symposium on Theory of computing", pages={"380","","388"}, url="http://doi.acm.org/10.1145/509907.509965", publisher="ACM", series="STOC \'02") public class FloatHyperplaneCosineFactory extends FloatHashFunctionFactory
The hash function hashes the input vector into a binary value (i.e. 0 or 1). A random vector on the surface of a hypersphere is generated during construction. The hash code is computed by calculating the dot product of the random vector with the input vector and testing to see whether the value is greater than or equal to 0 (1 is output) or less than 0 (0 is output).
ndims, rng
Constructor and Description |
---|
FloatHyperplaneCosineFactory(int ndims,
cern.jet.random.engine.MersenneTwister rng)
Construct with the given arguments.
|
Modifier and Type | Method and Description |
---|---|
org.openimaj.lsh.functions.FloatHyperplaneCosineFactory.Function |
create()
Construct a new
HashFunction . |
protected FloatFVComparison |
fvDistanceFunction() |
distanceFunction
public FloatHyperplaneCosineFactory(int ndims, cern.jet.random.engine.MersenneTwister rng)
ndims
- The number of dimensionsrng
- A random number generatorpublic org.openimaj.lsh.functions.FloatHyperplaneCosineFactory.Function create()
HashFunctionFactory
HashFunction
.HashFunction
protected FloatFVComparison fvDistanceFunction()
fvDistanceFunction
in class FloatHashFunctionFactory