rehashing
|
#include <AdaptiveHBE.h>
Public Member Functions | |
AdaptiveHBE (shared_ptr< MatrixXd > data, shared_ptr< Kernel > k, double lb, double eps, bool sketch) | |
![]() | |
std::vector< double > | query (VectorXd q) |
void | setMedians (int l) |
Public Attributes | |
vector< UniformHBE > | u_levels |
vector< SketchHBE > | s_levels |
![]() | |
double | totalTime = 0 |
Protected Member Functions | |
std::vector< double > | evaluateQuery (VectorXd q, int level) |
Additional Inherited Members | |
![]() | |
int | numPoints |
double | gamma = 0.5 |
int | I |
int | L = 3 |
std::vector< double > | mui |
std::vector< int > | Mi |
std::vector< double > | ti |
std::vector< int > | ki |
std::vector< double > | wi |
double | r |
std::string | EXP_STR = "exp" |
Adaptive sampling via HBE.
AdaptiveHBE::AdaptiveHBE | ( | shared_ptr< MatrixXd > | data, |
shared_ptr< Kernel > | k, | ||
double | lb, | ||
double | eps, | ||
bool | sketch | ||
) |
data | dataset |
k | kernel |
lb | tau (minimum density) |
eps | relative error |
sketch | if true, use HBS as a sketch; otherwise use uniform sampling as a sketch |
|
protectedvirtual |
For subclasses to implement: evaluate density of query q at the given level.
Implements AdaptiveEstimator.
vector<SketchHBE> AdaptiveHBE::s_levels |
Collection of estimators at all levels. At each level, we have a collection of hashing tables created by evaluating i.i.d hash function with a partiuclar hashing schemes on samples drawn from HBS.
vector<UniformHBE> AdaptiveHBE::u_levels |
Collection of estimators at all levels. At each level, we have a collection of hashing tables created by evaluating i.i.d hash function with a partiuclar hashing schemes on random samples from the dataset.