#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 | |
const Matrix & | covariance (unsigned int i) const |
covariance matrix of a component | |
const Matrix & | covariance () const |
combined covariance | |
Vector | d1LnPdf (const Vector &) const |
gradient of ln(pdf) | |
Vector | d1Pdf (const Vector &) const |
gradient | |
Matrix | d2LnPdf (const Vector &) const |
Hessian of ln(pdf) | |
Matrix | d2Pdf (const Vector &) const |
Hessian. | |
GaussianSumUtilities (const MultiState &state) | |
double | lnPdf (const Vector &) const |
value of ln(pdf) | |
const Vector & | mean () const |
combined mean | |
const Vector & | mean (unsigned int i) const |
mean value of a component | |
const SingleGaussianState< N > & | mode () const |
bool | modeIsValid () const |
mode status | |
double | pdf (const Vector &) const |
value of the p.d.f. | |
unsigned int | size () const |
number of components | |
const MultiState & | state () const |
multi-state | |
double | weight () const |
combined weight | |
double | weight (unsigned int i) const |
weight of a component | |
~GaussianSumUtilities () | |
Protected Member Functions | |
Vector | computeModeWithoutTransform () const |
calculation of mode | |
Private Types | |
enum | ModeStatus { Valid, NotValid, NotComputed } |
Private Member Functions | |
void | computeMode () const |
calculation of mode with transformation of pdf | |
MultiGaussianState1D | constrainedState (const Vector &d, const Vector &x0) const |
state constrained to a line x = s*d+x0 | |
Vector | d1LnPdf (const Vector &, const std::vector< double > &) const |
gradient of ln(pdf) using the pdf components at the evaluation point | |
Vector | d1Pdf (const Vector &, const std::vector< double > &) const |
gradient using the pdf components at the evaluation point | |
Matrix | d2LnPdf (const Vector &, const std::vector< double > &) const |
Hessian of ln(pdf) using the pdf components at the evaluation point. | |
Matrix | d2Pdf (const Vector &, const std::vector< double > &) const |
Hessian using the pdf components at the evaluation point. | |
bool | findMode (Vector &mode, double &pdfAtMode, const Vector &xStart) const |
mode from starting value in ln(pdf); returns true on success | |
double | gauss (const double &, const double &, const double &) const |
value of gaussian distribution | |
double | gauss (const Vector &, const Vector &, const Matrix &) const |
value of multidimensional gaussian distribution | |
double | lnPdf (const Vector &, const std::vector< double > &) const |
value of ln(pdf) using the pdf components at the evaluation point | |
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 | |
std::vector< double > | pdfComponents (const Vector &) const |
pdf components | |
void | setInvalidMode () const |
set mode "state" in case of failure | |
void | setMode (const Vector &mode) const |
set mode "state" from solution of mode finding | |
Matrix | tensorProduct (const Vector &) const |
Symmetric Tensor Product (not recognized by standard ROOT Math) | |
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.
enum GaussianSumUtilities::ModeStatus [private] |
Definition at line 28 of file GaussianSumUtilities.h.
{ Valid, NotValid, NotComputed };
GaussianSumUtilities< N >::GaussianSumUtilities | ( | const MultiState & | state | ) | [inline] |
Definition at line 31 of file GaussianSumUtilities.h.
: theState(state), theModeStatus(NotComputed) { }
GaussianSumUtilities< N >::~GaussianSumUtilities | ( | ) | [inline] |
Definition at line 35 of file GaussianSumUtilities.h.
{ }
const SingleStateContainer& GaussianSumUtilities< N >::components | ( | ) | const [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().
{ return theState.components(); }
void GaussianSumUtilities< N >::computeMode | ( | ) | const [private] |
calculation of mode with transformation of pdf
Vector GaussianSumUtilities< N >::computeModeWithoutTransform | ( | ) | const [protected] |
calculation of mode
MultiGaussianState1D GaussianSumUtilities< N >::constrainedState | ( | const Vector & | d, |
const Vector & | x0 | ||
) | const [private] |
state constrained to a line x = s*d+x0
const Matrix& GaussianSumUtilities< N >::covariance | ( | void | ) | const [inline] |
combined covariance
Definition at line 89 of file GaussianSumUtilities.h.
References MultiGaussianState< N >::covariance(), and GaussianSumUtilities< N >::theState.
{ return theState.covariance(); }
const Matrix& GaussianSumUtilities< N >::covariance | ( | unsigned int | i | ) | const [inline] |
covariance matrix of a component
Definition at line 59 of file GaussianSumUtilities.h.
References GaussianSumUtilities< N >::components(), and i.
{ return components()[i]->covariance(); }
Vector GaussianSumUtilities< N >::d1LnPdf | ( | const Vector & | , |
const std::vector< double > & | |||
) | const [private] |
gradient of ln(pdf) using the pdf components at the evaluation point
Vector GaussianSumUtilities< N >::d1LnPdf | ( | const Vector & | ) | const |
gradient of ln(pdf)
Vector GaussianSumUtilities< N >::d1Pdf | ( | const Vector & | ) | const |
gradient
Vector GaussianSumUtilities< N >::d1Pdf | ( | const Vector & | , |
const std::vector< double > & | |||
) | const [private] |
gradient using the pdf components at the evaluation point
Matrix GaussianSumUtilities< N >::d2LnPdf | ( | const Vector & | , |
const std::vector< double > & | |||
) | const [private] |
Hessian of ln(pdf) using the pdf components at the evaluation point.
Matrix GaussianSumUtilities< N >::d2LnPdf | ( | const Vector & | ) | const |
Hessian of ln(pdf)
Matrix GaussianSumUtilities< N >::d2Pdf | ( | const Vector & | , |
const std::vector< double > & | |||
) | const [private] |
Hessian using the pdf components at the evaluation point.
Matrix GaussianSumUtilities< N >::d2Pdf | ( | const Vector & | ) | const |
Hessian.
bool GaussianSumUtilities< N >::findMode | ( | Vector & | mode, |
double & | pdfAtMode, | ||
const Vector & | xStart | ||
) | const [private] |
mode from starting value in ln(pdf); returns true on success
double GaussianSumUtilities< N >::gauss | ( | const double & | , |
const double & | , | ||
const double & | |||
) | const [private] |
value of gaussian distribution
double GaussianSumUtilities< N >::gauss | ( | const Vector & | , |
const Vector & | , | ||
const Matrix & | |||
) | const [private] |
value of multidimensional gaussian distribution
double GaussianSumUtilities< N >::lnPdf | ( | const Vector & | , |
const std::vector< double > & | |||
) | const [private] |
value of ln(pdf) using the pdf components at the evaluation point
double GaussianSumUtilities< N >::lnPdf | ( | const Vector & | ) | const |
value of ln(pdf)
Matrix GaussianSumUtilities< N >::localCovariance | ( | const Vector & | x | ) | const [private] |
Local variance from Hessian matrix. Only valid if x corresponds to a (local) maximum!
const Vector& GaussianSumUtilities< N >::mean | ( | ) | const [inline] |
combined mean
Definition at line 85 of file GaussianSumUtilities.h.
References MultiGaussianState< N >::mean(), and GaussianSumUtilities< N >::theState.
const Vector& GaussianSumUtilities< N >::mean | ( | unsigned int | i | ) | const [inline] |
mean value of a component
Definition at line 55 of file GaussianSumUtilities.h.
References GaussianSumUtilities< N >::components(), and i.
{ return components()[i]->mean(); }
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 std::vector< double > & | |||
) | const [private] |
value of the p.d.f. using the pdf components at the evaluation point
double GaussianSumUtilities< N >::pdf | ( | const Vector & | ) | const |
value of the p.d.f.
std::vector<double> GaussianSumUtilities< N >::pdfComponents | ( | const Vector & | ) | const [private] |
pdf components
void GaussianSumUtilities< N >::setInvalidMode | ( | ) | const [private] |
set mode "state" in case of failure
void GaussianSumUtilities< N >::setMode | ( | const Vector & | mode | ) | const [private] |
set mode "state" from solution of mode finding
unsigned int GaussianSumUtilities< N >::size | ( | void | ) | const [inline] |
number of components
Definition at line 39 of file GaussianSumUtilities.h.
References GaussianSumUtilities< N >::components().
{ return components().size(); }
const MultiState& GaussianSumUtilities< N >::state | ( | ) | const [inline] |
multi-state
Definition at line 47 of file GaussianSumUtilities.h.
References GaussianSumUtilities< N >::theState.
{ return theState; }
Matrix GaussianSumUtilities< N >::tensorProduct | ( | const Vector & | ) | const [private] |
Symmetric Tensor Product (not recognized by standard ROOT Math)
double GaussianSumUtilities< N >::weight | ( | void | ) | const [inline] |
combined weight
Definition at line 81 of file GaussianSumUtilities.h.
References GaussianSumUtilities< N >::theState, and MultiGaussianState< N >::weight().
double GaussianSumUtilities< N >::weight | ( | unsigned int | i | ) | const [inline] |
weight of a component
Definition at line 51 of file GaussianSumUtilities.h.
References GaussianSumUtilities< N >::components(), and i.
{ return components()[i]->weight(); }
SingleGaussianState<N> GaussianSumUtilities< N >::theMode [mutable, private] |
Definition at line 148 of file GaussianSumUtilities.h.
ModeStatus GaussianSumUtilities< N >::theModeStatus [mutable, private] |
Definition at line 146 of file GaussianSumUtilities.h.
const MultiState& GaussianSumUtilities< N >::theState [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().