rehashing
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
SketchHBE Class Reference

#include <SketchHBE.h>

Inheritance diagram for SketchHBE:
MoMEstimator

Public Member Functions

 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)
 
- Public Member Functions inherited from MoMEstimator
double query (VectorXd q, double lb, int m)
 

Public Attributes

vector< HashTabletables
 
- Public Attributes inherited from MoMEstimator
double totalTime = 0
 

Protected Member Functions

double evaluateQuery (VectorXd query)
 
vector< double > MoM (VectorXd query, int L, int m)
 

Detailed Description

HBE on HBS

Constructor & Destructor Documentation

◆ 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
Xfull dataset
Mnumber of samples
wbin width
knumber of hash functions
kerkernel 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
Xfull dataset
Mnumber of samples
wbin width
knumber of hash functions
scalesnumber of weight scales in hash buckets
kerkernel 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
Xfull dataset
sketchesHBS to sample points from
indicesmaps a sample (index) from HBS to an index in the whole dataset
Mnumber of samples
wbin width
knumber of hash functions
kerkernel function
rngrandom number generator

Member Function Documentation

◆ evaluateQuery()

double SketchHBE::evaluateQuery ( VectorXd  query)
protected

Take a biased sample from a hash table via HBE.

Parameters
queryquery point
Returns
normalized contribution of the biased sample

◆ MoM()

vector< double > SketchHBE::MoM ( VectorXd  q,
int  L,
int  m 
)
protectedvirtual
Parameters
qquery
Lmedian of L means
mmeans of m samples
Returns
: a vector of L elements, where each element is a sum of m samples

Implements MoMEstimator.

Member Data Documentation

◆ tables

vector<HashTable> SketchHBE::tables

A collection of hash tables for HBE.


The documentation for this class was generated from the following files: