added kernel density wrapper

added general kld solution
fixed minor bugs
added tests
This commit is contained in:
toni
2017-03-23 19:52:06 +01:00
parent b03804d378
commit 59502931e5
7 changed files with 207 additions and 8 deletions

View File

@@ -15,8 +15,8 @@ namespace Distribution {
private:
const Eigen::VectorXd mu;
const Eigen::MatrixXd sigma;
Eigen::VectorXd mu;
Eigen::MatrixXd sigma;
const double _a;
const Eigen::MatrixXd _sigmaInv;
@@ -61,6 +61,14 @@ namespace Distribution {
return this->_sigmaInv;
}
void setSigma(Eigen::MatrixXd sigma){
this->sigma = sigma;
}
void setMu(Eigen::VectorXd mu){
this->mu = mu;
}
/** return a NormalN based on given data */
static NormalDistributionN getNormalNFromSamples(const Eigen::MatrixXd& data) {