#include <GaussianSumUtilities1D.h>
Classes | |
struct | FinderState |
Public Member Functions | |
double | cdf (const double &) const |
value of the c.d.f. More... | |
const std::vector < SingleGaussianState1D > & | components () const |
components More... | |
double | d1LnPdf (const double &) const |
first derivative of ln(pdf) More... | |
double | d1Pdf (const double &) const |
first derivative of the p.d.f. More... | |
double | d2LnPdf (const double &) const |
second derivative of ln(pdf) More... | |
double | d2Pdf (const double &) const |
second derivative of the p.d.f. More... | |
double | d3Pdf (const double &) const |
third derivative of the p.d.f. More... | |
GaussianSumUtilities1D (const MultiGaussianState1D &state) | |
double | lnPdf (const double &) const |
ln(pdf) More... | |
double | mean (unsigned int i) const |
mean value of a component More... | |
double | mean () const |
combined mean More... | |
const SingleGaussianState1D & | mode () const |
bool | modeIsValid () const |
mode status More... | |
double | pdf (unsigned int i, double x) const |
pdf of a single component at x More... | |
double | pdf (double) const |
value of the p.d.f. More... | |
double | quantile (const double) const |
Quantile (i.e. x for a given value of the c.d.f.) More... | |
unsigned int | size () const |
number of components More... | |
double | standardDeviation (unsigned int i) const |
standard deviation of a component More... | |
double | variance (unsigned int i) const |
variance of a component More... | |
double | variance () const |
combined covariance More... | |
double | weight (unsigned int i) const |
weight of a component More... | |
double | weight () const |
combined weight More... | |
~GaussianSumUtilities1D () | |
Private Types | |
enum | ModeStatus { Valid, NotValid, NotComputed } |
Private Member Functions | |
double | combinedMean () const |
Mean value of combined state. More... | |
void | computeMode () const |
calculation of mode More... | |
double | d1LnPdf (double, const std::vector< double > &) const |
first derivative of ln(pdf) using the pdf components at the evaluation point More... | |
double | d1Pdf (double, const std::vector< double > &) const |
first derivative of the p.d.f. using the pdf components at the evaluation point More... | |
double | d2LnPdf (double, const std::vector< double > &) const |
second derivative of ln(pdf) using the pdf components at the evaluation point More... | |
double | d2Pdf (double, const std::vector< double > &) const |
second derivative of the p.d.f. using the pdf components at the evaluation point More... | |
double | d3Pdf (double, const std::vector< double > &) const |
third derivative of the p.d.f. using the pdf components at the evaluation point More... | |
bool | findMode (double &mode, double &pdfAtMode, const double &xStart, const double &scale) const |
double | localVariance (double x) const |
std::vector< double > | pdfComponents (const double &) const |
pdf components More... | |
void | pdfComponents (double, std::vector< double > &) const |
pdf components More... | |
void | update (FinderState &state, double x) const |
Static Private Member Functions | |
static double | gauss (double, double, double) |
Value of gaussian distribution. More... | |
static double | gaussInt (double, double, double) |
Integrated value of gaussian distribution. More... | |
static double | lnPdf (double, const std::vector< double > &) |
ln(pdf) using the pdf components at the evaluation point More... | |
static double | pdf (double, const std::vector< double > &) |
value of the p.d.f. using the pdf components at the evaluation point More... | |
Private Attributes | |
SingleGaussianState1D | theMode |
ModeStatus | theModeStatus |
const MultiGaussianState1D & | theState |
Utility class for the analysis of one-dimensional Gaussian mixtures. The input state is assumed to exist for the lifetime of this object.
Definition at line 16 of file GaussianSumUtilities1D.h.
|
private |
|
inline |
Definition at line 21 of file GaussianSumUtilities1D.h.
|
inline |
Definition at line 25 of file GaussianSumUtilities1D.h.
double GaussianSumUtilities1D::cdf | ( | const double & | x | ) | const |
value of the c.d.f.
Definition at line 288 of file GaussianSumUtilities1D.cc.
|
private |
Mean value of combined state.
Definition at line 463 of file GaussianSumUtilities1D.cc.
|
inline |
components
Definition at line 30 of file GaussianSumUtilities1D.h.
References MultiGaussianState1D::components(), and theState.
Referenced by mean(), size(), standardDeviation(), variance(), and weight().
|
private |
calculation of mode
Definition at line 101 of file GaussianSumUtilities1D.cc.
double GaussianSumUtilities1D::d1LnPdf | ( | const double & | x | ) | const |
first derivative of ln(pdf)
Definition at line 322 of file GaussianSumUtilities1D.cc.
|
private |
first derivative of ln(pdf) using the pdf components at the evaluation point
Definition at line 422 of file GaussianSumUtilities1D.cc.
double GaussianSumUtilities1D::d1Pdf | ( | const double & | x | ) | const |
first derivative of the p.d.f.
Definition at line 298 of file GaussianSumUtilities1D.cc.
|
private |
first derivative of the p.d.f. using the pdf components at the evaluation point
Definition at line 376 of file GaussianSumUtilities1D.cc.
double GaussianSumUtilities1D::d2LnPdf | ( | const double & | x | ) | const |
second derivative of ln(pdf)
Definition at line 328 of file GaussianSumUtilities1D.cc.
|
private |
second derivative of ln(pdf) using the pdf components at the evaluation point
Definition at line 433 of file GaussianSumUtilities1D.cc.
double GaussianSumUtilities1D::d2Pdf | ( | const double & | x | ) | const |
second derivative of the p.d.f.
Definition at line 304 of file GaussianSumUtilities1D.cc.
|
private |
second derivative of the p.d.f. using the pdf components at the evaluation point
Definition at line 388 of file GaussianSumUtilities1D.cc.
double GaussianSumUtilities1D::d3Pdf | ( | const double & | x | ) | const |
third derivative of the p.d.f.
Definition at line 310 of file GaussianSumUtilities1D.cc.
|
private |
third derivative of the p.d.f. using the pdf components at the evaluation point
Definition at line 400 of file GaussianSumUtilities1D.cc.
|
private |
Finds mode. Input: start value and typical scale. Output: mode and pdf(mode). Return value is true on success.
Definition at line 215 of file GaussianSumUtilities1D.cc.
|
staticprivate |
Value of gaussian distribution.
Definition at line 444 of file GaussianSumUtilities1D.cc.
|
staticprivate |
Integrated value of gaussian distribution.
Definition at line 457 of file GaussianSumUtilities1D.cc.
double GaussianSumUtilities1D::lnPdf | ( | const double & | x | ) | const |
ln(pdf)
Definition at line 316 of file GaussianSumUtilities1D.cc.
|
staticprivate |
ln(pdf) using the pdf components at the evaluation point
Definition at line 413 of file GaussianSumUtilities1D.cc.
|
private |
Local variance from Hessian matrix. Only valid if x corresponds to a (local) maximum!
Definition at line 477 of file GaussianSumUtilities1D.cc.
|
inline |
mean value of a component
Definition at line 36 of file GaussianSumUtilities1D.h.
References components(), and i.
|
inline |
combined mean
Definition at line 75 of file GaussianSumUtilities1D.h.
References MultiGaussianState1D::mean(), and theState.
const SingleGaussianState1D & GaussianSumUtilities1D::mode | ( | void | ) | const |
Mode "state": mean = mode, variance = local variance at mode, weight chosen to have pdf(mode) equal to the one of the mixture
Definition at line 94 of file GaussianSumUtilities1D.cc.
bool GaussianSumUtilities1D::modeIsValid | ( | ) | const |
mode status
Definition at line 87 of file GaussianSumUtilities1D.cc.
double GaussianSumUtilities1D::pdf | ( | unsigned int | i, |
double | x | ||
) | const |
pdf of a single component at x
Definition at line 22 of file GaussianSumUtilities1D.cc.
double GaussianSumUtilities1D::pdf | ( | double | x | ) | const |
value of the p.d.f.
Definition at line 278 of file GaussianSumUtilities1D.cc.
|
staticprivate |
value of the p.d.f. using the pdf components at the evaluation point
Definition at line 370 of file GaussianSumUtilities1D.cc.
|
private |
pdf components
Definition at line 334 of file GaussianSumUtilities1D.cc.
|
private |
pdf components
Definition at line 352 of file GaussianSumUtilities1D.cc.
double GaussianSumUtilities1D::quantile | ( | const double | q | ) | const |
Quantile (i.e. x for a given value of the c.d.f.)
Definition at line 28 of file GaussianSumUtilities1D.cc.
|
inline |
number of components
Definition at line 28 of file GaussianSumUtilities1D.h.
References components().
|
inline |
standard deviation of a component
Definition at line 38 of file GaussianSumUtilities1D.h.
References components(), and i.
|
private |
Definition at line 265 of file GaussianSumUtilities1D.cc.
Referenced by Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom().
|
inline |
variance of a component
Definition at line 43 of file GaussianSumUtilities1D.h.
References components(), and i.
|
inline |
combined covariance
Definition at line 79 of file GaussianSumUtilities1D.h.
References theState, and MultiGaussianState1D::variance().
|
inline |
weight of a component
Definition at line 34 of file GaussianSumUtilities1D.h.
References components(), and i.
|
inline |
combined weight
Definition at line 71 of file GaussianSumUtilities1D.h.
References theState, and MultiGaussianState1D::weight().
|
mutableprivate |
Definition at line 139 of file GaussianSumUtilities1D.h.
|
mutableprivate |
Definition at line 138 of file GaussianSumUtilities1D.h.
|
private |
Definition at line 135 of file GaussianSumUtilities1D.h.
Referenced by components(), mean(), variance(), and weight().