@Reference(authors="M.S. Charikar", title="Similarity estimation techniques from rounding algorithms", booktitle="Proc. 34th ACM Symposium on Theory of computing, STOC\'02", url="https://dx.doi.org/10.1145%2F509907.509965") public class CosineHashFunctionFamily extends Object implements LocalitySensitiveHashFunctionFamily<NumberVector>
M.S. Charikar
Similarity estimation techniques from rounding algorithms
Proc. 34th ACM Symposium on Theory of computing, STOC'02
Modifier and Type | Class and Description |
---|---|
static class |
CosineHashFunctionFamily.Parameterizer
Parameterization class.
|
Modifier and Type | Field and Description |
---|---|
private int |
k
The number of projections to use for each hash function.
|
private RandomProjectionFamily |
proj
Projection family to use.
|
Constructor and Description |
---|
CosineHashFunctionFamily(int k,
RandomFactory random)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
ArrayList<? extends LocalitySensitiveHashFunction<? super NumberVector>> |
generateHashFunctions(Relation<? extends NumberVector> relation,
int l)
Generate hash functions for the given relation.
|
TypeInformation |
getInputTypeRestriction()
Get the input type information.
|
boolean |
isCompatible(DistanceFunction<?> df)
Check whether the given distance function can be accelerated using this
hash family.
|
private RandomProjectionFamily proj
private int k
public CosineHashFunctionFamily(int k, RandomFactory random)
k
- Number of projections to use.random
- Random factory.public TypeInformation getInputTypeRestriction()
LocalitySensitiveHashFunctionFamily
getInputTypeRestriction
in interface LocalitySensitiveHashFunctionFamily<NumberVector>
public ArrayList<? extends LocalitySensitiveHashFunction<? super NumberVector>> generateHashFunctions(Relation<? extends NumberVector> relation, int l)
LocalitySensitiveHashFunctionFamily
generateHashFunctions
in interface LocalitySensitiveHashFunctionFamily<NumberVector>
relation
- Relation to indexl
- Number of hash tables to usepublic boolean isCompatible(DistanceFunction<?> df)
LocalitySensitiveHashFunctionFamily
isCompatible
in interface LocalitySensitiveHashFunctionFamily<NumberVector>
df
- Distance function.true
when appropriate.Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.