CMP++: Uncertainty Quantification & Bayesian Calibration
Loading...
Searching...
No Matches
cmp::density Namespace Reference

Classes

class  KDE
 Multivariate Kernel Density Estimation (KDE) class. More...
 

Functions

Eigen::MatrixXd bandwidthSelectionRule (const KDE::BandWidthSelectionMethod &method, Eigen::Ref< Eigen::MatrixXd > xObs)
 Computes the bandwidth matrix using standard rules of thumb.
 
void bandwidthOptimizationCrossValidation (const cmp::statistics::KFold &kf, Eigen::Ref< Eigen::MatrixXd > xObs, std::shared_ptr< cmp::kernel::Kernel > kernel, std::shared_ptr< cmp::kernel::Bandwidth > initialBandwidth, const double &min, const double &max, nlopt::algorithm alg, const double &tol=1e-4)
 Optimizes the bandwidth matrix using K-Fold cross-validation over the observations.
 

Function Documentation

◆ bandwidthOptimizationCrossValidation()

void cmp::density::bandwidthOptimizationCrossValidation ( const cmp::statistics::KFold kf,
Eigen::Ref< Eigen::MatrixXd >  xObs,
std::shared_ptr< cmp::kernel::Kernel kernel,
std::shared_ptr< cmp::kernel::Bandwidth initialBandwidth,
const double &  min,
const double &  max,
nlopt::algorithm  alg,
const double &  tol = 1e-4 
)

Optimizes the bandwidth matrix using K-Fold cross-validation over the observations.

Parameters
kfKFold cross-validation partitioning helper.
xObsObservation data matrix.
kernelThe density kernel to use.
initialBandwidthInput/output bandwidth object to optimize.
minMinimum bounds for bandwidth parameters.
maxMaximum bounds for bandwidth parameters.
algThe optimization algorithm.
tolOptimization relative tolerance.

◆ bandwidthSelectionRule()

Eigen::MatrixXd cmp::density::bandwidthSelectionRule ( const KDE::BandWidthSelectionMethod method,
Eigen::Ref< Eigen::MatrixXd >  xObs 
)

Computes the bandwidth matrix using standard rules of thumb.

Parameters
methodSelection rule (SCOTT or SILVERMAN).
xObsObservation data matrix.
Returns
Calculated bandwidth matrix.