|
| KDE (const double relError=KDEDefaultParams::relError, const double absError=KDEDefaultParams::absError, KernelType kernel=KernelType(), const KDEMode mode=KDEDefaultParams::mode, MetricType metric=MetricType(), const bool monteCarlo=KDEDefaultParams::monteCarlo, const double mcProb=KDEDefaultParams::mcProb, const size_t initialSampleSize=KDEDefaultParams::initialSampleSize, const double mcEntryCoef=KDEDefaultParams::mcEntryCoef, const double mcBreakCoef=KDEDefaultParams::mcBreakCoef) |
| Initialize KDE object using custom instantiated Metric and Kernel objects. More...
|
|
| KDE (const KDE &other) |
| Construct KDE object as a copy of the given model. More...
|
|
| KDE (KDE &&other) |
| Construct KDE object taking ownership of the given model. More...
|
|
| ~KDE () |
| Destroy the KDE object. More...
|
|
double | AbsoluteError () const |
| Get absolute error tolerance. More...
|
|
void | AbsoluteError (const double newError) |
| Modify absolute error tolerance (0 <= newError). More...
|
|
void | Evaluate (MatType querySet, arma::vec &estimations) |
| Estimate density of each point in the query set given the data of the reference set. More...
|
|
void | Evaluate (Tree *queryTree, const std::vector< size_t > &oldFromNewQueries, arma::vec &estimations) |
| Estimate density of each point in the query set given the data of an already created query tree. More...
|
|
void | Evaluate (arma::vec &estimations) |
| Estimate density of each point in the reference set given the data of the reference set. More...
|
|
bool | IsTrained () const |
| Check whether KDE model is trained or not. More...
|
|
const KernelType & | Kernel () const |
| Get the kernel. More...
|
|
KernelType & | Kernel () |
| Modify the kernel. More...
|
|
double | MCBreakCoef () const |
| Get Monte Carlo break coefficient. More...
|
|
void | MCBreakCoef (const double newCoef) |
| Modify Monte Carlo break coefficient. (0 < newCoef <= 1). More...
|
|
double | MCEntryCoef () const |
| Get Monte Carlo entry coefficient. More...
|
|
void | MCEntryCoef (const double newCoef) |
| Modify Monte Carlo entry coefficient. (newCoef >= 1). More...
|
|
size_t | MCInitialSampleSize () const |
| Get Monte Carlo initial sample size. More...
|
|
size_t & | MCInitialSampleSize () |
| Modify Monte Carlo initial sample size. More...
|
|
double | MCProb () const |
| Get Monte Carlo probability of error being bounded by relative error. More...
|
|
void | MCProb (const double newProb) |
| Modify Monte Carlo probability of error being bounded by relative error. More...
|
|
const MetricType & | Metric () const |
| Get the metric. More...
|
|
MetricType & | Metric () |
| Modify the metric. More...
|
|
KDEMode | Mode () const |
| Get the mode of KDE. More...
|
|
KDEMode & | Mode () |
| Modify the mode of KDE. More...
|
|
bool | MonteCarlo () const |
| Get whether Monte Carlo estimations are being used or not. More...
|
|
bool & | MonteCarlo () |
| Modify whether Monte Carlo estimations are being used or not. More...
|
|
KDE & | operator= (const KDE &other) |
| Copy a KDE model. More...
|
|
KDE & | operator= (KDE &&other) |
| Move a KDE model. More...
|
|
bool | OwnsReferenceTree () const |
| Check whether reference tree is owned by the KDE model. More...
|
|
Tree * | ReferenceTree () |
| Get the reference tree. More...
|
|
double | RelativeError () const |
| Get relative error tolerance. More...
|
|
void | RelativeError (const double newError) |
| Modify relative error tolerance (0 <= newError <= 1). More...
|
|
|
void | serialize (Archive &ar, const uint32_t version) |
| Serialize the model. More...
|
|
void | Train (MatType referenceSet) |
| Trains the KDE model. More...
|
|
void | Train (Tree *referenceTree, std::vector< size_t > *oldFromNewReferences) |
| Trains the KDE model. More...
|
|
template<typename KernelType = kernel::GaussianKernel, typename MetricType = mlpack::metric::EuclideanDistance, typename MatType = arma::mat, template< typename TreeMetricType, typename TreeStatType, typename TreeMatType > class TreeType = tree::KDTree, template< typename RuleType > class DualTreeTraversalType = TreeType<MetricType, kde::KDEStat, MatType>::template DualTreeTraverser, template< typename RuleType > class SingleTreeTraversalType = TreeType<MetricType, kde::KDEStat, MatType>::template SingleTreeTraverser>
class mlpack::kde::KDE< KernelType, MetricType, MatType, TreeType, DualTreeTraversalType, SingleTreeTraversalType >
The KDE class is a template class for performing Kernel Density Estimations.
In statistics, kernel density estimation is a way to estimate the probability density function of a variable in a non parametric way. This implementation performs this estimation using a tree-independent dual-tree algorithm. Details about this algorithm are available in KDERules.
- Template Parameters
-
KernelType | Kernel function to use for KDE calculations. |
MetricType | Metric to use for KDE calculations. |
MatType | Type of data to use. |
TreeType | Type of tree to use; must satisfy the TreeType policy API. |
DualTreeTraversalType | Type of dual-tree traversal to use. |
SingleTreeTraversalType | Type of single-tree traversal to use. |
Definition at line 88 of file kde.hpp.