mlpack
Public Member Functions | Protected Types | Protected Attributes | List of all members
mlpack::kde::KDEWrapper< KernelType, TreeType > Class Template Reference

KDEWrapper is a wrapper class for all KDE types supported by KDEModel. More...

#include <kde_model.hpp>

Inheritance diagram for mlpack::kde::KDEWrapper< KernelType, TreeType >:
Inheritance graph
[legend]
Collaboration diagram for mlpack::kde::KDEWrapper< KernelType, TreeType >:
Collaboration graph
[legend]

Public Member Functions

 KDEWrapper (const double relError, const double absError, const KernelType &kernel)
 Create the KDEWrapper object, initializing the internally-held KDE object.
 
virtual KDEWrapperClone () 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 KDEModeMode ()
 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.
 
- Public Member Functions inherited from mlpack::kde::KDEWrapperBase
 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.
 

Detailed Description

template<typename KernelType, template< typename TreeMetricType, typename TreeStatType, typename TreeMatType > class TreeType>
class mlpack::kde::KDEWrapper< KernelType, TreeType >

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.

Member Function Documentation

◆ Clone()

template<typename KernelType, template< typename TreeMetricType, typename TreeStatType, typename TreeMatType > class TreeType>
virtual KDEWrapper* mlpack::kde::KDEWrapper< KernelType, TreeType >::Clone ( ) const
inlinevirtual

Create a new KDEWrapper that is the same as this one.

This function will properly handle polymorphism.

Implements mlpack::kde::KDEWrapperBase.


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