#include <GaussianSumUtilities.h>
Public Types | |
typedef ROOT::Math::SMatrix < double, N, N, ROOT::Math::MatRepStd< double, N > > | GenMatrix |
typedef SingleState::Matrix | Matrix |
typedef MultiGaussianState< N > | MultiState |
typedef SingleGaussianState< N > | SingleState |
typedef MultiState::SingleStateContainer | SingleStateContainer |
typedef MultiState::SingleStatePtr | SingleStatePtr |
typedef SingleState::Vector | Vector |
Public Member Functions | |
const SingleStateContainer & | components () const |
components More... | |
const Matrix & | covariance (unsigned int i) const |
covariance matrix of a component More... | |
const Matrix & | covariance () const |
combined covariance More... | |
Vector | d1LnPdf (const Vector &) const |
gradient of ln(pdf) More... | |
Vector | d1Pdf (const Vector &) const |
gradient More... | |
Matrix | d2LnPdf (const Vector &) const |
Hessian of ln(pdf) More... | |
Matrix | d2Pdf (const Vector &) const |
Hessian. More... | |
GaussianSumUtilities (const MultiState &state) | |
double | lnPdf (const Vector &) const |
value of ln(pdf) More... | |
const Vector & | mean (unsigned int i) const |
mean value of a component More... | |
const Vector & | mean () const |
combined mean More... | |
const SingleGaussianState< N > & | mode () const |
bool | modeIsValid () const |
mode status More... | |
double | pdf (const Vector &) const |
value of the p.d.f. More... | |
unsigned int | size () const |
number of components More... | |
const MultiState & | state () const |
multi-state More... | |
double | weight (unsigned int i) const |
weight of a component More... | |
double | weight () const |
combined weight More... | |
~GaussianSumUtilities () | |
Protected Member Functions | |
Vector | computeModeWithoutTransform () const |
calculation of mode More... | |
Private Types | |
enum | ModeStatus { Valid, NotValid, NotComputed } |
Private Member Functions | |
void | computeMode () const |
calculation of mode with transformation of pdf More... | |
MultiGaussianState1D | constrainedState (const Vector &d, const Vector &x0) const |
state constrained to a line x = s*d+x0 More... | |
Vector | d1LnPdf (const Vector &, const std::vector< double > &) const |
gradient of ln(pdf) using the pdf components at the evaluation point More... | |
Vector | d1Pdf (const Vector &, const std::vector< double > &) const |
gradient using the pdf components at the evaluation point More... | |
Matrix | d2LnPdf (const Vector &, const std::vector< double > &) const |
Hessian of ln(pdf) using the pdf components at the evaluation point. More... | |
Matrix | d2Pdf (const Vector &, const std::vector< double > &) const |
Hessian using the pdf components at the evaluation point. More... | |
bool | findMode (Vector &mode, double &pdfAtMode, const Vector &xStart) const |
mode from starting value in ln(pdf); returns true on success More... | |
double | gauss (const double &, const double &, const double &) const |
value of gaussian distribution More... | |
double | gauss (const Vector &, const Vector &, const Matrix &) const |
value of multidimensional gaussian distribution More... | |
double | lnPdf (const Vector &, const std::vector< double > &) const |
value of ln(pdf) using the pdf components at the evaluation point More... | |
Matrix | localCovariance (const Vector &x) const |
double | pdf (const Vector &, const std::vector< double > &) const |
value of the p.d.f. using the pdf components at the evaluation point More... | |
std::vector< double > | pdfComponents (const Vector &) const |
pdf components More... | |
void | setInvalidMode () const |
set mode "state" in case of failure More... | |
void | setMode (const Vector &mode) const |
set mode "state" from solution of mode finding More... | |
Matrix | tensorProduct (const Vector &) const |
Symmetric Tensor Product (not recognized by standard ROOT Math) More... | |
Private Attributes | |
SingleGaussianState< N > | theMode |
ModeStatus | theModeStatus |
const MultiState & | theState |
Utility class for the analysis of multi-dimensional Gaussian mixtures. The input state is assumed to exist for the lifetime of this object.
Definition at line 15 of file GaussianSumUtilities.h.
typedef ROOT::Math::SMatrix<double,N,N,ROOT::Math::MatRepStd<double,N> > GaussianSumUtilities< N >::GenMatrix |
Definition at line 20 of file GaussianSumUtilities.h.
typedef SingleState::Matrix GaussianSumUtilities< N >::Matrix |
Definition at line 23 of file GaussianSumUtilities.h.
typedef MultiGaussianState<N> GaussianSumUtilities< N >::MultiState |
Definition at line 18 of file GaussianSumUtilities.h.
typedef SingleGaussianState<N> GaussianSumUtilities< N >::SingleState |
Definition at line 17 of file GaussianSumUtilities.h.
typedef MultiState::SingleStateContainer GaussianSumUtilities< N >::SingleStateContainer |
Definition at line 25 of file GaussianSumUtilities.h.
typedef MultiState::SingleStatePtr GaussianSumUtilities< N >::SingleStatePtr |
Definition at line 24 of file GaussianSumUtilities.h.
typedef SingleState::Vector GaussianSumUtilities< N >::Vector |
Definition at line 22 of file GaussianSumUtilities.h.
|
private |
|
inline |
Definition at line 31 of file GaussianSumUtilities.h.
|
inline |
Definition at line 35 of file GaussianSumUtilities.h.
|
inline |
components
Definition at line 43 of file GaussianSumUtilities.h.
References MultiGaussianState< N >::components(), and GaussianSumUtilities< N >::theState.
Referenced by GaussianSumUtilities< N >::covariance(), GaussianSumUtilities< N >::mean(), GaussianSumUtilities< N >::size(), and GaussianSumUtilities< N >::weight().
|
private |
calculation of mode with transformation of pdf
|
protected |
calculation of mode
|
private |
state constrained to a line x = s*d+x0
|
inline |
covariance matrix of a component
Definition at line 59 of file GaussianSumUtilities.h.
References GaussianSumUtilities< N >::components(), and i.
|
inline |
combined covariance
Definition at line 89 of file GaussianSumUtilities.h.
References MultiGaussianState< N >::covariance(), and GaussianSumUtilities< N >::theState.
Vector GaussianSumUtilities< N >::d1LnPdf | ( | const Vector & | ) | const |
gradient of ln(pdf)
|
private |
gradient of ln(pdf) using the pdf components at the evaluation point
Vector GaussianSumUtilities< N >::d1Pdf | ( | const Vector & | ) | const |
gradient
|
private |
gradient using the pdf components at the evaluation point
Matrix GaussianSumUtilities< N >::d2LnPdf | ( | const Vector & | ) | const |
Hessian of ln(pdf)
|
private |
Hessian of ln(pdf) using the pdf components at the evaluation point.
Matrix GaussianSumUtilities< N >::d2Pdf | ( | const Vector & | ) | const |
Hessian.
|
private |
Hessian using the pdf components at the evaluation point.
|
private |
mode from starting value in ln(pdf); returns true on success
|
private |
value of gaussian distribution
|
private |
value of multidimensional gaussian distribution
double GaussianSumUtilities< N >::lnPdf | ( | const Vector & | ) | const |
value of ln(pdf)
|
private |
value of ln(pdf) using the pdf components at the evaluation point
|
private |
Local variance from Hessian matrix. Only valid if x corresponds to a (local) maximum!
|
inline |
mean value of a component
Definition at line 55 of file GaussianSumUtilities.h.
References GaussianSumUtilities< N >::components(), and i.
|
inline |
combined mean
Definition at line 85 of file GaussianSumUtilities.h.
References MultiGaussianState< N >::mean(), and GaussianSumUtilities< N >::theState.
const SingleGaussianState<N>& GaussianSumUtilities< N >::mode | ( | ) | const |
Mode "state": mean = mode, covariance = local covariance at mode, weight chosen to have pdf(mode) equal to the one of the mixture
bool GaussianSumUtilities< N >::modeIsValid | ( | ) | const |
mode status
double GaussianSumUtilities< N >::pdf | ( | const Vector & | ) | const |
value of the p.d.f.
|
private |
value of the p.d.f. using the pdf components at the evaluation point
|
private |
pdf components
|
private |
set mode "state" in case of failure
|
private |
set mode "state" from solution of mode finding
|
inline |
number of components
Definition at line 39 of file GaussianSumUtilities.h.
References GaussianSumUtilities< N >::components().
Referenced by ntuple._Collection::__iter__(), and ntuple._Collection::__len__().
|
inline |
multi-state
Definition at line 47 of file GaussianSumUtilities.h.
References GaussianSumUtilities< N >::theState.
|
private |
Symmetric Tensor Product (not recognized by standard ROOT Math)
|
inline |
weight of a component
Definition at line 51 of file GaussianSumUtilities.h.
References GaussianSumUtilities< N >::components(), and i.
Referenced by cuy.ValElement::__init__(), cuy.additionElement::__init__(), cuy.superimposeElement::__init__(), and cuy.graphElement::__init__().
|
inline |
combined weight
Definition at line 81 of file GaussianSumUtilities.h.
References GaussianSumUtilities< N >::theState, and MultiGaussianState< N >::weight().
Referenced by cuy.ValElement::__init__(), cuy.additionElement::__init__(), cuy.superimposeElement::__init__(), and cuy.graphElement::__init__().
|
mutableprivate |
Definition at line 148 of file GaussianSumUtilities.h.
|
mutableprivate |
Definition at line 146 of file GaussianSumUtilities.h.
|
private |
Definition at line 143 of file GaussianSumUtilities.h.
Referenced by GaussianSumUtilities< N >::components(), GaussianSumUtilities< N >::covariance(), GaussianSumUtilities< N >::mean(), GaussianSumUtilities< N >::state(), and GaussianSumUtilities< N >::weight().