Package smile.neighbor.lsh
Class HashValueParzenModel
java.lang.Object
smile.neighbor.lsh.HashValueParzenModel
Hash value Parzen model for multi-probe hash.
-
Constructor Summary
ConstructorDescriptionHashValueParzenModel
(MultiProbeHash hash, MultiProbeSample[] samples, double sigma) Constructor. -
Method Summary
-
Constructor Details
-
HashValueParzenModel
Constructor.- Parameters:
hash
- the hash function.samples
- training data for multi-probe LSH.sigma
- the width of Parzen window.
-
-
Method Details
-
estimate
public void estimate(int m, double h) Given a hash value h, estimate the Gaussian model (mean and variance) of neighbors existing in the corresponding bucket.- Parameters:
m
- the index of hash function.h
- the given hash value.
-
mean
public double mean()Returns the mean.- Returns:
- the mean.
-
sd
public double sd()Returns the standard deviation.- Returns:
- the conditional standard deviation.
-