A base class for fixed bandwidth kernel distributions. More...
#include <vpdl_kernel_base.h>

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_fbw_base () | |
| vpdl_kernel_fbw_base (const std::vector< vector > &samplez, T bandwid=T(1)) | |
| T | bandwidth () const |
| Access the bandwidth. More... | |
| void | set_bandwidth (T b) |
| Set the kernel bandwidth. More... | |
| virtual T | kernel_norm_const () const =0 |
| The normalization constant for the kernel. 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 vpdl_distribution< T, n > * | clone () const =0 |
| Create a copy on the heap and return base class pointer. More... | |
| virtual T | density (const vector &pt) const =0 |
| 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 | log_prob_density (const vector &pt) const |
| Evaluate the log probability density at a point. More... | |
| virtual T | gradient_density (const vector &pt, vector &g) const =0 |
| Compute the gradient of the unnormalized density at a point. More... | |
| virtual T | cumulative_prob (const vector &pt) const =0 |
| Evaluate the cumulative distribution function at a point. More... | |
| virtual vector | inverse_cdf (const T &p) const |
| Compute the inverse of the cumulative_prob() function. More... | |
| virtual T | 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 =0 |
| Compute the covariance of the distribution. More... | |
Private Attributes | |
| T | bandwidth_ |
| the fixed bandwidth for all kernels. More... | |
A base class for fixed bandwidth kernel distributions.
This class assumes that the bandwidth is fixed for all kernels
Definition at line 106 of file vpdl_kernel_base.h.
|
inherited |
the data type used for vectors.
Definition at line 39 of file vpdl_distribution.h.
| typedef vpdt_field_traits<vector>::matrix_type vpdl_kernel_fbw_base< T, n >::matrix |
the data type used for matrices.
Definition at line 112 of file vpdl_kernel_base.h.
| typedef vpdt_field_default<T,n>::type vpdl_kernel_fbw_base< T, n >::vector |
the data type used for vectors.
Definition at line 110 of file vpdl_kernel_base.h.
|
inline |
Definition at line 115 of file vpdl_kernel_base.h.
|
inline |
Definition at line 119 of file vpdl_kernel_base.h.
|
inlinevirtualinherited |
Add a new sample point.
Reimplemented in vpdl_kernel_vbw_base< T, n >.
Definition at line 56 of file vpdl_kernel_base.h.
|
inline |
Access the bandwidth.
Definition at line 123 of file vpdl_kernel_base.h.
|
virtualinherited |
The probability of being in an axis-aligned box.
The box is defined by two points, the minimum and maximum. Implemented in terms of cumulative_prob() by default.
Reimplemented in vpdl_mixture< T, n >, vpdl_kernel_gaussian_sfbw< T, n >, and vpdl_gaussian_sphere< T, n >.
Definition at line 89 of file vpdl_distribution.hxx.
|
inlinevirtualinherited |
Remove all sample points.
Reimplemented in vpdl_kernel_vbw_base< T, n >.
Definition at line 64 of file vpdl_kernel_base.h.
|
pure virtualinherited |
Create a copy on the heap and return base class pointer.
Implemented in vpdl_mixture< T, n >, vpdl_mixture_of< dist_t >, vpdl_gaussian_sphere< T, n >, vpdl_gaussian_indep< T, n >, vpdl_gaussian< T, n >, and vpdl_kernel_gaussian_sfbw< T, n >.
|
pure virtualinherited |
Compute the covariance of the distribution.
This may be trivial for distributions like Gaussians, but actually involves computation for others.
Implemented in vpdl_mixture< T, n >, vpdl_kernel_gaussian_sfbw< T, n >, vpdl_gaussian_sphere< T, n >, vpdl_gaussian< T, n >, vpdl_gaussian_indep< T, n >, and vpdl_mixture_of< dist_t >.
|
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.
|
pure virtualinherited |
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
Implemented in vpdl_mixture< T, n >, vpdl_kernel_gaussian_sfbw< T, n >, vpdl_gaussian_sphere< T, n >, vpdl_gaussian_indep< T, n >, and vpdl_gaussian< T, n >.
|
pure virtualinherited |
Evaluate the unnormalized density at a point.
Implemented in vpdl_mixture< T, n >, vpdl_gaussian_sphere< T, n >, vpdl_gaussian_indep< T, n >, vpdl_gaussian< T, n >, and vpdl_kernel_gaussian_sfbw< T, n >.
|
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.
|
pure virtualinherited |
Compute the gradient of the unnormalized density at a point.
| g | the gradient vector |
Implemented in vpdl_mixture< T, n >, vpdl_kernel_gaussian_sfbw< T, n >, vpdl_gaussian_sphere< T, n >, vpdl_gaussian_indep< T, n >, and vpdl_gaussian< T, n >.
|
virtualinherited |
Compute the inverse of the cumulative_prob() function.
The value of x: P(x'<x) = P for x' drawn from the distribution.
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.
|
pure virtual |
The normalization constant for the kernel.
Implemented in vpdl_kernel_gaussian_sfbw< T, n >.
|
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.
|
inlinevirtual |
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.
|
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.
|
inlinevirtualinherited |
Evaluate the probability density at a point.
Reimplemented in vpdl_mixture< T, n >, vpdl_kernel_gaussian_sfbw< T, n >, vpdl_gaussian_sphere< T, n >, vpdl_gaussian_indep< T, n >, and vpdl_gaussian< T, n >.
Definition at line 59 of file vpdl_distribution.h.
|
inlineinherited |
Access the sample points.
Definition at line 76 of file vpdl_kernel_base.h.
|
inline |
Set the kernel bandwidth.
Definition at line 126 of file vpdl_kernel_base.h.
|
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.
|
private |
the fixed bandwidth for all kernels.
Definition at line 141 of file vpdl_kernel_base.h.
1.8.15