A dual-tree traversal Rules class for kernel density estimation. More...
Public Types | |
typedef tree::TraversalInfo< TreeType > | TraversalInfoType |
Public Member Functions | |
KDERules (const arma::mat &referenceSet, const arma::mat &querySet, arma::vec &densities, const double relError, const double absError, const double mcProb, const size_t initialSampleSize, const double mcAccessCoef, const double mcBreakCoef, MetricType &metric, KernelType &kernel, const bool monteCarlo, const bool sameSet) | |
Construct KDERules. More... | |
double | BaseCase (const size_t queryIndex, const size_t referenceIndex) |
Base Case. More... | |
size_t | BaseCases () const |
Get the number of base cases. More... | |
size_t | MinimumBaseCases () const |
Get the minimum number of base cases we need to perform to have acceptable results. More... | |
double | Rescore (const size_t queryIndex, TreeType &referenceNode, const double oldScore) const |
SingleTree Score. More... | |
double | Rescore (TreeType &queryNode, TreeType &referenceNode, const double oldScore) const |
Dual-Tree Rescore. More... | |
double | Score (const size_t queryIndex, TreeType &referenceNode) |
SingleTree Rescore. More... | |
double | Score (TreeType &queryNode, TreeType &referenceNode) |
Dual-Tree Score. More... | |
size_t | Scores () const |
Get the number of scores. More... | |
const TraversalInfoType & | TraversalInfo () const |
Get traversal information. More... | |
TraversalInfoType & | TraversalInfo () |
Modify traversal information. More... | |
A dual-tree traversal Rules class for kernel density estimation.
This contains the Score() and BaseCase() implementations.
Definition at line 26 of file kde_rules.hpp.
typedef tree::TraversalInfo<TreeType> TraversalInfoType |
Definition at line 82 of file kde_rules.hpp.
KDERules | ( | const arma::mat & | referenceSet, |
const arma::mat & | querySet, | ||
arma::vec & | densities, | ||
const double | relError, | ||
const double | absError, | ||
const double | mcProb, | ||
const size_t | initialSampleSize, | ||
const double | mcAccessCoef, | ||
const double | mcBreakCoef, | ||
MetricType & | metric, | ||
KernelType & | kernel, | ||
const bool | monteCarlo, | ||
const bool | sameSet | ||
) |
Construct KDERules.
referenceSet | Reference set data. |
querySet | Query set data. |
densities | Vector where estimations will be written. |
relError | Relative error tolerance. |
absError | Absolute error tolerance. |
mcProb | Probability of relative error compliance for Monte Carlo estimations. |
initialSampleSize | Initial size of the Monte Carlo samples. |
mcAccessCoef | Access coefficient for Monte Carlo estimations. |
mcBreakCoef | Break coefficient for Monte Carlo estimations. |
metric | Instantiated metric. |
kernel | Instantiated kernel. |
monteCarlo | If true Monte Carlo estimations will be applied when possible. |
sameSet | True if query and reference sets are the same (monochromatic evaluation). |
double BaseCase | ( | const size_t | queryIndex, |
const size_t | referenceIndex | ||
) |
Base Case.
Referenced by KDECleanRules< TreeType >::KDECleanRules().
|
inline |
Get the number of base cases.
Definition at line 91 of file kde_rules.hpp.
|
inline |
Get the minimum number of base cases we need to perform to have acceptable results.
Definition at line 98 of file kde_rules.hpp.
double Rescore | ( | const size_t | queryIndex, |
TreeType & | referenceNode, | ||
const double | oldScore | ||
) | const |
SingleTree Score.
double Rescore | ( | TreeType & | queryNode, |
TreeType & | referenceNode, | ||
const double | oldScore | ||
) | const |
Dual-Tree Rescore.
double Score | ( | const size_t | queryIndex, |
TreeType & | referenceNode | ||
) |
SingleTree Rescore.
Referenced by KDECleanRules< TreeType >::KDECleanRules(), and KDECleanRules< TreeType >::Rescore().
double Score | ( | TreeType & | queryNode, |
TreeType & | referenceNode | ||
) |
Dual-Tree Score.
|
inline |
Get the number of scores.
Definition at line 94 of file kde_rules.hpp.
|
inline |
Get traversal information.
Definition at line 85 of file kde_rules.hpp.
|
inline |
Modify traversal information.
Definition at line 88 of file kde_rules.hpp.