Public Types | Public Member Functions | List of all members
vpdl_kernel_gaussian_sfbw< T, n > Class Template Reference

A fixed bandwidth spherical Gaussian kernel distribution. More...

#include <vpdl_kernel_gaussian_sfbw.h>

Inheritance diagram for vpdl_kernel_gaussian_sfbw< T, n >:
Inheritance graph
[legend]

Public Types

typedef vpdt_field_default< T, n >::type vector
 the data type used for vectors. More...
 
typedef vpdt_field_traits< vector >::matrix_type matrix
 the data type used for matrices. More...
 
typedef vpdt_field_default< T, n >::type field_type
 the data type used for vectors. More...
 

Public Member Functions

 vpdl_kernel_gaussian_sfbw ()
 Default Constructor. More...
 
 vpdl_kernel_gaussian_sfbw (const std::vector< vector > &samplez, T bandwid=T(1))
 Constructor - from sample centers and bandwidth (variance). More...
 
virtual vpdl_distribution< T, n > * clone () const
 Create a copy on the heap and return base class pointer. More...
 
virtual T density (const vector &pt) const
 Evaluate the unnormalized density at a point. More...
 
virtual T prob_density (const vector &pt) const
 Evaluate the probability density at a point. More...
 
virtual T gradient_density (const vector &pt, vector &g) const
 Compute the gradient of the unnormalized density at a point. More...
 
virtual T cumulative_prob (const vector &pt) const
 Evaluate the cumulative distribution function at a point. More...
 
box_prob (const vector &min_pt, const vector &max_pt) const
 The probability of being in an axis-aligned box. More...
 
virtual void compute_covar (matrix &covar) const
 Compute the covariance of the distribution. More...
 
virtual T kernel_norm_const () const
 The normalization constant for the kernel. More...
 
bandwidth () const
 Access the bandwidth. More...
 
void set_bandwidth (T b)
 Set the kernel bandwidth. More...
 
virtual T norm_const () const
 The normalization constant for the density. More...
 
unsigned int num_components () const
 Return the number of components in the mixture. More...
 
virtual unsigned int dimension () const
 Return the run time dimension, which does not equal n when n==0. More...
 
virtual void add_sample (const vector &s)
 Add a new sample point. More...
 
virtual void clear_samples ()
 Remove all sample points. More...
 
virtual void set_samples (const std::vector< vector > &samplez)
 Set the collection of sample points. More...
 
const std::vector< vector > & samples () const
 Access the sample points. More...
 
virtual void compute_mean (vector &mean) const
 Compute the mean of the distribution. More...
 
virtual T log_prob_density (const vector &pt) const
 Evaluate the log probability density at a point. More...
 
virtual vector inverse_cdf (const T &p) const
 Compute the inverse of the cumulative_prob() function. More...
 

Detailed Description

template<class T, unsigned int n = 0>
class vpdl_kernel_gaussian_sfbw< T, n >

A fixed bandwidth spherical Gaussian kernel distribution.

The bandwidth is the standard deviation of the Gaussian kernel.

Definition at line 28 of file vpdl_kernel_gaussian_sfbw.h.

Member Typedef Documentation

◆ field_type

template<class T, unsigned int n = 0>
typedef vpdt_field_default<T,n>::type vpdl_distribution< T, n >::field_type
inherited

the data type used for vectors.

Definition at line 39 of file vpdl_distribution.h.

◆ matrix

template<class T , unsigned int n = 0>
typedef vpdt_field_traits<vector>::matrix_type vpdl_kernel_gaussian_sfbw< T, n >::matrix

the data type used for matrices.

Definition at line 34 of file vpdl_kernel_gaussian_sfbw.h.

◆ vector

template<class T , unsigned int n = 0>
typedef vpdt_field_default<T,n>::type vpdl_kernel_gaussian_sfbw< T, n >::vector

the data type used for vectors.

Definition at line 32 of file vpdl_kernel_gaussian_sfbw.h.

Constructor & Destructor Documentation

◆ vpdl_kernel_gaussian_sfbw() [1/2]

template<class T , unsigned int n = 0>
vpdl_kernel_gaussian_sfbw< T, n >::vpdl_kernel_gaussian_sfbw ( )
inline

Default Constructor.

Definition at line 37 of file vpdl_kernel_gaussian_sfbw.h.

◆ vpdl_kernel_gaussian_sfbw() [2/2]

template<class T , unsigned int n = 0>
vpdl_kernel_gaussian_sfbw< T, n >::vpdl_kernel_gaussian_sfbw ( const std::vector< vector > &  samplez,
bandwid = T(1) 
)
inline

Constructor - from sample centers and bandwidth (variance).

Definition at line 40 of file vpdl_kernel_gaussian_sfbw.h.

Member Function Documentation

◆ add_sample()

template<class T , unsigned int n = 0>
virtual void vpdl_kernel_base< T, n >::add_sample ( const vector s)
inlinevirtualinherited

Add a new sample point.

Reimplemented in vpdl_kernel_vbw_base< T, n >.

Definition at line 56 of file vpdl_kernel_base.h.

◆ bandwidth()

template<class T , unsigned int n = 0>
T vpdl_kernel_fbw_base< T, n >::bandwidth ( ) const
inlineinherited

Access the bandwidth.

Definition at line 123 of file vpdl_kernel_base.h.

◆ box_prob()

template<class T , unsigned int n = 0>
T vpdl_kernel_gaussian_sfbw< T, n >::box_prob ( const vector min_pt,
const vector max_pt 
) const
inlinevirtual

The probability of being in an axis-aligned box.

The box is defined by two points, the minimum and maximum. Reimplemented for efficiency since the axis are independent

Reimplemented from vpdl_distribution< T, n >.

Definition at line 142 of file vpdl_kernel_gaussian_sfbw.h.

◆ clear_samples()

template<class T , unsigned int n = 0>
virtual void vpdl_kernel_base< T, n >::clear_samples ( )
inlinevirtualinherited

Remove all sample points.

Reimplemented in vpdl_kernel_vbw_base< T, n >.

Definition at line 64 of file vpdl_kernel_base.h.

◆ clone()

template<class T , unsigned int n = 0>
virtual vpdl_distribution<T,n>* vpdl_kernel_gaussian_sfbw< T, n >::clone ( ) const
inlinevirtual

Create a copy on the heap and return base class pointer.

Implements vpdl_distribution< T, n >.

Definition at line 45 of file vpdl_kernel_gaussian_sfbw.h.

◆ compute_covar()

template<class T , unsigned int n = 0>
virtual void vpdl_kernel_gaussian_sfbw< T, n >::compute_covar ( matrix covar) const
inlinevirtual

Compute the covariance of the distribution.

Implements vpdl_distribution< T, n >.

Definition at line 167 of file vpdl_kernel_gaussian_sfbw.h.

◆ compute_mean()

template<class T , unsigned int n = 0>
virtual void vpdl_kernel_base< T, n >::compute_mean ( vector mean) const
inlinevirtualinherited

Compute the mean of the distribution.

Assume that each kernel has its mean at the sample point

Implements vpdl_distribution< T, n >.

Definition at line 83 of file vpdl_kernel_base.h.

◆ cumulative_prob()

template<class T , unsigned int n = 0>
virtual T vpdl_kernel_gaussian_sfbw< T, n >::cumulative_prob ( const vector pt) const
inlinevirtual

Evaluate the cumulative distribution function at a point.

This is the integral of the density function from negative infinity (in all dimensions) to the point in question

Implements vpdl_distribution< T, n >.

Definition at line 118 of file vpdl_kernel_gaussian_sfbw.h.

◆ density()

template<class T , unsigned int n = 0>
virtual T vpdl_kernel_gaussian_sfbw< T, n >::density ( const vector pt) const
inlinevirtual

Evaluate the unnormalized density at a point.

Implements vpdl_distribution< T, n >.

Definition at line 51 of file vpdl_kernel_gaussian_sfbw.h.

◆ dimension()

template<class T , unsigned int n = 0>
virtual unsigned int vpdl_kernel_base< T, n >::dimension ( ) const
inlinevirtualinherited

Return the run time dimension, which does not equal n when n==0.

Implements vpdl_distribution< T, n >.

Definition at line 48 of file vpdl_kernel_base.h.

◆ gradient_density()

template<class T , unsigned int n = 0>
virtual T vpdl_kernel_gaussian_sfbw< T, n >::gradient_density ( const vector pt,
vector g 
) const
inlinevirtual

Compute the gradient of the unnormalized density at a point.

Returns
the density at pt since it is usually needed as well, and is often trivial to compute while computing gradient
Return values
gthe gradient vector

Implements vpdl_distribution< T, n >.

Definition at line 86 of file vpdl_kernel_gaussian_sfbw.h.

◆ inverse_cdf()

template<class T, unsigned int n>
vpdl_distribution< T, n >::vector vpdl_distribution< T, n >::inverse_cdf ( const T &  p) const
virtualinherited

Compute the inverse of the cumulative_prob() function.

The value of x: P(x'<x) = P for x' drawn from the distribution.

Note
This is only valid for univariate distributions multivariate distributions will return a quiet NaN

The value of x: P(x'<x) = P for x' drawn from the distribution. This is only valid for univariate distributions multivariate distributions will return -infinity

Definition at line 78 of file vpdl_distribution.hxx.

◆ kernel_norm_const()

template<class T , unsigned int n = 0>
virtual T vpdl_kernel_gaussian_sfbw< T, n >::kernel_norm_const ( ) const
inlinevirtual

The normalization constant for the kernel.

Implements vpdl_kernel_fbw_base< T, n >.

Definition at line 190 of file vpdl_kernel_gaussian_sfbw.h.

◆ log_prob_density()

template<class T, unsigned int n = 0>
virtual T vpdl_distribution< T, n >::log_prob_density ( const vector pt) const
inlinevirtualinherited

Evaluate the log probability density at a point.

Reimplemented in vpdl_gaussian_sphere< T, n >, vpdl_gaussian_indep< T, n >, and vpdl_gaussian< T, n >.

Definition at line 65 of file vpdl_distribution.h.

◆ norm_const()

template<class T , unsigned int n = 0>
virtual T vpdl_kernel_fbw_base< T, n >::norm_const ( ) const
inlinevirtualinherited

The normalization constant for the density.

When density() is multiplied by this value it becomes prob_density norm_const() is reciprocal of the integral of density over the entire field

Implements vpdl_distribution< T, n >.

Definition at line 134 of file vpdl_kernel_base.h.

◆ num_components()

template<class T , unsigned int n = 0>
unsigned int vpdl_kernel_base< T, n >::num_components ( ) const
inlinevirtualinherited

Return the number of components in the mixture.

Implements vpdl_multi_cmp_dist< T, n >.

Definition at line 45 of file vpdl_kernel_base.h.

◆ prob_density()

template<class T , unsigned int n = 0>
virtual T vpdl_kernel_gaussian_sfbw< T, n >::prob_density ( const vector pt) const
inlinevirtual

Evaluate the probability density at a point.

Reimplemented from vpdl_distribution< T, n >.

Definition at line 73 of file vpdl_kernel_gaussian_sfbw.h.

◆ samples()

template<class T , unsigned int n = 0>
const std::vector<vector>& vpdl_kernel_base< T, n >::samples ( ) const
inlineinherited

Access the sample points.

Definition at line 76 of file vpdl_kernel_base.h.

◆ set_bandwidth()

template<class T , unsigned int n = 0>
void vpdl_kernel_fbw_base< T, n >::set_bandwidth ( b)
inlineinherited

Set the kernel bandwidth.

Definition at line 126 of file vpdl_kernel_base.h.

◆ set_samples()

template<class T , unsigned int n = 0>
virtual void vpdl_kernel_base< T, n >::set_samples ( const std::vector< vector > &  samplez)
inlinevirtualinherited

Set the collection of sample points.

Reimplemented in vpdl_kernel_vbw_base< T, n >.

Definition at line 70 of file vpdl_kernel_base.h.


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