mlpack
|
KDEWrapper is a wrapper class for all KDE types supported by KDEModel. More...
#include <kde_model.hpp>
Public Member Functions | |
KDEWrapper (const double relError, const double absError, const KernelType &kernel) | |
Create the KDEWrapper object, initializing the internally-held KDE object. | |
virtual KDEWrapper * | Clone () const |
Create a new KDEWrapper that is the same as this one. More... | |
virtual | ~KDEWrapper () |
Destruct the KDEWrapper (nothing to do). | |
virtual void | Bandwidth (const double bw) |
Modify the bandwidth of the kernel. | |
virtual void | RelativeError (const double eps) |
Modify the relative error tolerance. | |
virtual void | AbsoluteError (const double eps) |
Modify the absolute error tolerance. | |
virtual bool | MonteCarlo () const |
Get whether Monte Carlo search is being used. | |
virtual bool & | MonteCarlo () |
Modify whether Monte Carlo search is being used. | |
virtual void | MCProb (const double mcProb) |
Modify the Monte Carlo probability. | |
virtual size_t | MCInitialSampleSize () const |
Get the Monte Carlo sample size. | |
virtual size_t & | MCInitialSampleSize () |
Modify the Monte Carlo sample size. | |
virtual void | MCEntryCoef (const double e) |
Modify the Monte Carlo entry coefficient. | |
virtual void | MCBreakCoef (const double b) |
Modify the Monte Carlo break coefficient. | |
virtual KDEMode | Mode () const |
Get the search mode. | |
virtual KDEMode & | Mode () |
Modify the search mode. | |
virtual void | Train (arma::mat &&referenceSet) |
Train the model (build the tree). | |
virtual void | Evaluate (arma::mat &&querySet, arma::vec &estimates) |
Perform bichromatic KDE (i.e. KDE with a separate query set). | |
virtual void | Evaluate (arma::vec &estimates) |
Perform monochromatic KDE (i.e. with the reference set as the query set). | |
template<typename Archive > | |
void | serialize (Archive &ar, const uint32_t) |
Serialize the KDE model. | |
![]() | |
KDEWrapperBase () | |
Create the KDEWrapperBase object. More... | |
virtual | ~KDEWrapperBase () |
Destruct the KDEWrapperBase (nothing to do). | |
Protected Types | |
typedef KDE< KernelType, metric::EuclideanDistance, arma::mat, TreeType > | KDEType |
Protected Attributes | |
KDEType | kde |
The instantiated KDE object that we are wrapping. | |
KDEWrapper is a wrapper class for all KDE types supported by KDEModel.
It can be extended with new child classes if new functionality for certain types is needed.
|
inlinevirtual |
Create a new KDEWrapper that is the same as this one.
This function will properly handle polymorphism.
Implements mlpack::kde::KDEWrapperBase.