Computes the Kernel Density Estimator (KDE) of a set of points.
More...
#include <KDE.hh>
|
| | KDE () |
| | Default constructor, initilizes everything to 0. More...
|
| |
| | KDE (std::vector< std::vector< double >> mat) |
| | Proper constructor, initilizes everything. More...
|
| |
| | KDE (const KDE &kde) |
| | Copy constructor. More...
|
| |
| KDE & | operator= (const KDE &kde) |
| | Equality operator. More...
|
| |
| double | operator() (const std::vector< double > &v) const |
| | Overloaded function operator, calls Evaluate. More...
|
| |
| double | operator() (const double &v) const |
| | Overloaded function operator, calls Evaluate. More...
|
| |
| double | operator() (const double *v) const |
| | Overloaded function operator, calls Evaluate. More...
|
| |
| | ~KDE () |
| | Destructor. More...
|
| |
| double | Evaluate (const std::vector< double > &v) const |
| | Performs the density estimation at an n-point v. More...
|
| |
| double | Evaluate (const double &v) const |
| | Performs the density estimation at an n-point v. More...
|
| |
| double | Evaluate (const double *v) const |
| | Performs the density estimation at an n-point v. More...
|
| |
| std::vector< double > | FastFunction (std::vector< std::vector< double >> points, double eps=1e-3) |
| | Returns the value of the KDE in the d-dimensional point (fast algorithm) More...
|
| |
| double | FunctionROOT (double *x, double *par) |
| | Returns the value of the KDE in the d-dimensional point (ROOT format) More...
|
| |
| void | Initialize () |
| | Initializes the KDE parameters, bandwidth. More...
|
| |
Computes the Kernel Density Estimator (KDE) of a set of points.
Default constructor, initilizes everything to 0.
| KDE::KDE |
( |
std::vector< std::vector< double >> |
mat | ) |
|
Proper constructor, initilizes everything.
| KDE::KDE |
( |
const KDE & |
kde | ) |
|
| double KDE::Evaluate |
( |
const std::vector< double > & |
v | ) |
const |
Performs the density estimation at an n-point v.
- Parameters
-
| v | Vector of coordinates of the n-point |
| double KDE::Evaluate |
( |
const double & |
v | ) |
const |
Performs the density estimation at an n-point v.
- Parameters
-
| v | One dimensional value of the point |
| double KDE::Evaluate |
( |
const double * |
v | ) |
const |
Performs the density estimation at an n-point v.
- Parameters
-
| v | Pointer to an array of coordinates of the n-point |
| std::vector< double > KDE::FastFunction |
( |
std::vector< std::vector< double >> |
points, |
|
|
double |
eps = 1e-3 |
|
) |
| |
Returns the value of the KDE in the d-dimensional point (fast algorithm)
- Parameters
-
| points | dxN matrix of points in which to evaluate the KDE |
| eps | Tolarable error with respect to the exact KDE |
- Returns
- Approximated value of the KDE in all of the points (N-vector)
| double KDE::FunctionROOT |
( |
double * |
x, |
|
|
double * |
par |
|
) |
| |
Returns the value of the KDE in the d-dimensional point (ROOT format)
- Parameters
-
| x | d-array of variables |
| par | Array of parameters |
- Returns
- Value of the KDE in x
Initializes the KDE parameters, bandwidth.
| double KDE::operator() |
( |
const std::vector< double > & |
v | ) |
const |
|
inline |
Overloaded function operator, calls Evaluate.
- Parameters
-
| double KDE::operator() |
( |
const double & |
v | ) |
const |
|
inline |
Overloaded function operator, calls Evaluate.
- Parameters
-
| double KDE::operator() |
( |
const double * |
v | ) |
const |
|
inline |
Overloaded function operator, calls Evaluate.
- Parameters
-
| v | Pointer to an array of coordinates |
| KDE & KDE::operator= |
( |
const KDE & |
kde | ) |
|
| Matrix< double > KDE::ScottBandwidth |
( |
std::vector< double > |
vsig, |
|
|
size_t |
n |
|
) |
| |
|
private |
Returns the Scott bandwidth matrix of order n.
- Parameters
-
| vsig | Vector of standard deviations on the variables |
| n | Number of samples |
- Returns
- Diagonal Scott bandwitdh
| Matrix< double > KDE::SilvermanBandwidth |
( |
std::vector< double > |
vsig, |
|
|
size_t |
n |
|
) |
| |
|
private |
Returns the Silverman bandwidth matrix of order n.
- Parameters
-
| vsig | d-vector of standard deviations of the variables |
| n | Number of samples |
- Returns
- Diagonal Silverman bandwitdh
Bandwidth algorithm name.
Multivariate Gaussian Kernel.
| std::vector<std::vector<double> > KDE::_samples |
|
private |
The documentation for this class was generated from the following files: