#include <SketchHBE.h>
|
| SketchHBE (shared_ptr< MatrixXd > X, int M, double w, int k, shared_ptr< Kernel > ker) |
|
| SketchHBE (shared_ptr< MatrixXd > X, int M, double w, int k, int scales, shared_ptr< Kernel > ker) |
|
| SketchHBE (shared_ptr< MatrixXd > X, vector< SketchTable > &sketches, vector< vector< int >> &indices, int M, double w, int k, shared_ptr< Kernel > ker, std::mt19937_64 &rng) |
|
double | query (VectorXd q, double lb, int m) |
|
◆ SketchHBE() [1/3]
SketchHBE::SketchHBE |
( |
shared_ptr< MatrixXd > |
X, |
|
|
int |
M, |
|
|
double |
w, |
|
|
int |
k, |
|
|
shared_ptr< Kernel > |
ker |
|
) |
| |
Build N_SKETCHES number of sketches (HBS); sample from sketches to build hash tables for HBE
- Parameters
-
X | full dataset |
M | number of samples |
w | bin width |
k | number of hash functions |
ker | kernel function |
◆ SketchHBE() [2/3]
SketchHBE::SketchHBE |
( |
shared_ptr< MatrixXd > |
X, |
|
|
int |
M, |
|
|
double |
w, |
|
|
int |
k, |
|
|
int |
scales, |
|
|
shared_ptr< Kernel > |
ker |
|
) |
| |
Build N_SKETCHES number of sketches (HBS); sample from sketches to build hash tables for HBE
- Parameters
-
X | full dataset |
M | number of samples |
w | bin width |
k | number of hash functions |
scales | number of weight scales in hash buckets |
ker | kernel function |
◆ SketchHBE() [3/3]
SketchHBE::SketchHBE |
( |
shared_ptr< MatrixXd > |
X, |
|
|
vector< SketchTable > & |
sketches, |
|
|
vector< vector< int >> & |
indices, |
|
|
int |
M, |
|
|
double |
w, |
|
|
int |
k, |
|
|
shared_ptr< Kernel > |
ker, |
|
|
std::mt19937_64 & |
rng |
|
) |
| |
Build HBE from points sampled from given sketches
- Parameters
-
X | full dataset |
sketches | HBS to sample points from |
indices | maps a sample (index) from HBS to an index in the whole dataset |
M | number of samples |
w | bin width |
k | number of hash functions |
ker | kernel function |
rng | random number generator |
◆ evaluateQuery()
double SketchHBE::evaluateQuery |
( |
VectorXd |
query | ) |
|
|
protected |
Take a biased sample from a hash table via HBE.
- Parameters
-
- Returns
- normalized contribution of the biased sample
◆ MoM()
vector< double > SketchHBE::MoM |
( |
VectorXd |
q, |
|
|
int |
L, |
|
|
int |
m |
|
) |
| |
|
protectedvirtual |
- Parameters
-
q | query |
L | median of L means |
m | means of m samples |
- Returns
- : a vector of L elements, where each element is a sum of m samples
Implements MoMEstimator.
◆ tables
A collection of hash tables for HBE.
The documentation for this class was generated from the following files: