KDEWrapper< KernelType, TreeType > Class Template Reference

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

Inheritance diagram for KDEWrapper< KernelType, TreeType >:

Public Member Functions

 KDEWrapper (const double relError, const double absError, const KernelType &kernel)
 Create the KDEWrapper object, initializing the internally-held KDE object. More...

 
virtual ~KDEWrapper ()
 Destruct the KDEWrapper (nothing to do). More...

 
virtual void AbsoluteError (const double eps)
 Modify the absolute error tolerance. More...

 
virtual void Bandwidth (const double bw)
 Modify the bandwidth of the kernel. More...

 
virtual KDEWrapperClone () const
 Create a new KDEWrapper that is the same as this one. More...

 
virtual void Evaluate (util::Timers &timers, arma::mat &&querySet, arma::vec &estimates)
 Perform bichromatic KDE (i.e. KDE with a separate query set). More...

 
virtual void Evaluate (util::Timers &timers, arma::vec &estimates)
 Perform monochromatic KDE (i.e. with the reference set as the query set). More...

 
virtual void MCBreakCoef (const double b)
 Modify the Monte Carlo break coefficient. More...

 
virtual void MCEntryCoef (const double e)
 Modify the Monte Carlo entry coefficient. More...

 
virtual size_t MCInitialSampleSize () const
 Get the Monte Carlo sample size. More...

 
virtual size_t & MCInitialSampleSize ()
 Modify the Monte Carlo sample size. More...

 
virtual void MCProb (const double mcProb)
 Modify the Monte Carlo probability. More...

 
virtual KDEMode Mode () const
 Get the search mode. More...

 
virtual KDEModeMode ()
 Modify the search mode. More...

 
virtual bool MonteCarlo () const
 Get whether Monte Carlo search is being used. More...

 
virtual bool & MonteCarlo ()
 Modify whether Monte Carlo search is being used. More...

 
virtual void RelativeError (const double eps)
 Modify the relative error tolerance. More...

 
template
<
typename
Archive
>
void serialize (Archive &ar, const uint32_t)
 Serialize the KDE model. More...

 
virtual void Train (util::Timers &timers, arma::mat &&referenceSet)
 Train the model (build the tree). More...

 
- Public Member Functions inherited from KDEWrapperBase
 KDEWrapperBase ()
 Create the KDEWrapperBase object. More...

 
virtual ~KDEWrapperBase ()
 Destruct the KDEWrapperBase (nothing to do). More...

 

Protected Types

typedef KDE< KernelType, metric::EuclideanDistance, arma::mat, TreeType > KDEType
 

Protected Attributes

KDEType kde
 The instantiated KDE object that we are wrapping. More...

 

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.

Definition at line 139 of file kde_model.hpp.

Member Typedef Documentation

◆ KDEType

typedef KDE<KernelType, metric::EuclideanDistance, arma::mat, TreeType> KDEType
protected

Definition at line 219 of file kde_model.hpp.

Constructor & Destructor Documentation

◆ KDEWrapper()

KDEWrapper ( const double  relError,
const double  absError,
const KernelType &  kernel 
)
inline

Create the KDEWrapper object, initializing the internally-held KDE object.

Definition at line 143 of file kde_model.hpp.

◆ ~KDEWrapper()

virtual ~KDEWrapper ( )
inlinevirtual

Destruct the KDEWrapper (nothing to do).

Definition at line 156 of file kde_model.hpp.

Member Function Documentation

◆ AbsoluteError()

virtual void AbsoluteError ( const double  eps)
inlinevirtual

Modify the absolute error tolerance.

Implements KDEWrapperBase.

Definition at line 165 of file kde_model.hpp.

◆ Bandwidth()

virtual void Bandwidth ( const double  bw)
inlinevirtual

Modify the bandwidth of the kernel.

Implements KDEWrapperBase.

Definition at line 159 of file kde_model.hpp.

◆ Clone()

virtual KDEWrapper* Clone ( ) const
inlinevirtual

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

This function will properly handle polymorphism.

Implements KDEWrapperBase.

Definition at line 153 of file kde_model.hpp.

◆ Evaluate() [1/2]

virtual void Evaluate ( util::Timers timers,
arma::mat &&  querySet,
arma::vec &  estimates 
)
virtual

Perform bichromatic KDE (i.e. KDE with a separate query set).

Implements KDEWrapperBase.

◆ Evaluate() [2/2]

virtual void Evaluate ( util::Timers timers,
arma::vec &  estimates 
)
virtual

Perform monochromatic KDE (i.e. with the reference set as the query set).

Implements KDEWrapperBase.

◆ MCBreakCoef()

virtual void MCBreakCoef ( const double  b)
inlinevirtual

Modify the Monte Carlo break coefficient.

Implements KDEWrapperBase.

Definition at line 190 of file kde_model.hpp.

◆ MCEntryCoef()

virtual void MCEntryCoef ( const double  e)
inlinevirtual

Modify the Monte Carlo entry coefficient.

Implements KDEWrapperBase.

Definition at line 187 of file kde_model.hpp.

◆ MCInitialSampleSize() [1/2]

virtual size_t MCInitialSampleSize ( ) const
inlinevirtual

Get the Monte Carlo sample size.

Implements KDEWrapperBase.

Definition at line 176 of file kde_model.hpp.

◆ MCInitialSampleSize() [2/2]

virtual size_t& MCInitialSampleSize ( )
inlinevirtual

Modify the Monte Carlo sample size.

Implements KDEWrapperBase.

Definition at line 181 of file kde_model.hpp.

◆ MCProb()

virtual void MCProb ( const double  mcProb)
inlinevirtual

Modify the Monte Carlo probability.

Implements KDEWrapperBase.

Definition at line 173 of file kde_model.hpp.

◆ Mode() [1/2]

virtual KDEMode Mode ( ) const
inlinevirtual

Get the search mode.

Implements KDEWrapperBase.

Definition at line 193 of file kde_model.hpp.

◆ Mode() [2/2]

virtual KDEMode& Mode ( )
inlinevirtual

Modify the search mode.

Implements KDEWrapperBase.

Definition at line 195 of file kde_model.hpp.

◆ MonteCarlo() [1/2]

virtual bool MonteCarlo ( ) const
inlinevirtual

Get whether Monte Carlo search is being used.

Implements KDEWrapperBase.

Definition at line 168 of file kde_model.hpp.

◆ MonteCarlo() [2/2]

virtual bool& MonteCarlo ( )
inlinevirtual

Modify whether Monte Carlo search is being used.

Implements KDEWrapperBase.

Definition at line 170 of file kde_model.hpp.

◆ RelativeError()

virtual void RelativeError ( const double  eps)
inlinevirtual

Modify the relative error tolerance.

Implements KDEWrapperBase.

Definition at line 162 of file kde_model.hpp.

◆ serialize()

void serialize ( Archive &  ar,
const uint32_t   
)
inline

Serialize the KDE model.

Definition at line 210 of file kde_model.hpp.

◆ Train()

virtual void Train ( util::Timers timers,
arma::mat &&  referenceSet 
)
virtual

Train the model (build the tree).

Implements KDEWrapperBase.

Member Data Documentation

◆ kde

KDEType kde
protected

The instantiated KDE object that we are wrapping.

Definition at line 222 of file kde_model.hpp.


The documentation for this class was generated from the following file:
  • /home/jenkins-mlpack/mlpack.org/_src/mlpack-git/src/mlpack/methods/kde/kde_model.hpp