Class KDE

Class Documentation

class KDE

The KDE class implements 1-D Gaussian kernel density estimators.

Public Functions

inline KDE()
KDE(std::vector<double>)
KDE(std::vector<double>, int n_bins)
void set_num_bins(int n_bins)
int theta_to_bin(double theta)
std::vector<double> resample(int n_samples, std::mt19937 &rng, std::uniform_real_distribution<double> &uni_dist, std::normal_distribution<double> &norm_dist)
std::vector<double> resample(int n_samples)
double pdf(double x)
std::vector<double> pdf(std::vector<double> v)
double logpdf(double x)

Public Members

std::vector<double> dataset = {}
std::vector<double> log_prior_hist = {}
double delta_theta = 1
int n_bins = 1
double bw
double mu = 0
double most_probable_theta = 0