Test hybrid elimination with a simple mixture model. More...
#include <gtsam/discrete/DecisionTreeFactor.h>
#include <gtsam/discrete/DiscreteConditional.h>
#include <gtsam/discrete/DiscreteKey.h>
#include <gtsam/hybrid/HybridBayesNet.h>
#include <gtsam/hybrid/HybridGaussianConditional.h>
#include <gtsam/hybrid/HybridGaussianFactorGraph.h>
#include <gtsam/inference/Key.h>
#include <gtsam/inference/Symbol.h>
#include <gtsam/linear/GaussianConditional.h>
#include <gtsam/linear/NoiseModel.h>
#include <CppUnitLite/TestHarness.h>
Go to the source code of this file.
Functions | |
double | Gaussian (double mu, double sigma, double z) |
Gaussian density function. More... | |
const DiscreteKey | m (M(0), 2) |
int | main () |
double | prob_m_z (double mu0, double mu1, double sigma0, double sigma1, double z) |
TEST (GaussianMixture, GaussianMixtureModel) | |
TEST (GaussianMixture, GaussianMixtureModel2) | |
Variables | |
const DiscreteValues | m1Assignment {{M(0), 1}} |
DiscreteConditional::shared_ptr | mixing |
Test hybrid elimination with a simple mixture model.
Definition in file testGaussianMixture.cpp.
double Gaussian | ( | double | mu, |
double | sigma, | ||
double | z | ||
) |
Gaussian density function.
Definition at line 47 of file testGaussianMixture.cpp.
const DiscreteKey m | ( | M(0) | , |
2 | |||
) |
int main | ( | ) |
Definition at line 166 of file testGaussianMixture.cpp.
double prob_m_z | ( | double | mu0, |
double | mu1, | ||
double | sigma0, | ||
double | sigma1, | ||
double | z | ||
) |
Closed form computation of P(m=1|z). If sigma0 == sigma1, it simplifies to a sigmoid function. Hardcodes 60/40 prior on mode.
Definition at line 56 of file testGaussianMixture.cpp.
TEST | ( | GaussianMixture | , |
GaussianMixtureModel | |||
) |
Definition at line 67 of file testGaussianMixture.cpp.
TEST | ( | GaussianMixture | , |
GaussianMixtureModel2 | |||
) |
Definition at line 111 of file testGaussianMixture.cpp.
const DiscreteValues m1Assignment {{M(0), 1}} |
Definition at line 40 of file testGaussianMixture.cpp.
Definition at line 43 of file testGaussianMixture.cpp.