|
|
| SmoothedEMUnfold1D (const Matrix< double > &responseMatrix, const LocalPolyFilter1D &filter, bool useConvolutions, bool useMultinomialCovariance=false, bool smoothLastIter=true, double convergenceEpsilon=1.0e-10, unsigned maxIterations=100000U) |
|
void | setMaxIterations (const unsigned u) |
|
void | useMultinomialCovariance (const bool b) |
|
void | smoothLastIteration (const bool b) |
|
void | setConvergenceEpsilon (double eps) |
|
double | convergenceEpsilon () const |
|
unsigned | maxIterations () const |
|
bool | usingMultinomialCovariance () const |
|
bool | smoothingLastIteration () const |
|
unsigned | lastNIterations () const |
|
unsigned | lastEPIterations () const |
|
double | lastSmoothingNormfactor () const |
|
virtual bool | unfold (const double *observed, unsigned lenObserved, const Matrix< double > *observationCovarianceMatrix, double *unfolded, unsigned lenUnfolded, Matrix< double > *unfoldedCovarianceMatrix) |
|
| AbsUnfold1D (const Matrix< double > &responseMatrix) |
|
const Matrix< double > & | responseMatrix () const |
|
const Matrix< double > & | transposedResponseMatrix () const |
|
const std::vector< double > & | efficiency () const |
|
std::pair< double, double > | smoothingNDoF () const |
|
std::pair< double, double > | responseNDoF () const |
|
std::pair< double, double > | smoothedResponseNDoF () const |
|
std::pair< double, double > | modelNDoF () |
|
virtual void | setInitialApproximation (const double *approx, unsigned lenApprox) |
|
virtual void | clearInitialApproximation () |
|
virtual const std::vector< double > & | getInitialApproximation () const |
|
virtual void | setFilter (const LocalPolyFilter1D *f) |
|
virtual const LocalPolyFilter1D * | getFilter (bool throwIfNull=false) const |
|
virtual void | useConvolutions (const bool b) |
|
bool | usingConvolutions () const |
|
|
void | update (const double *observed, unsigned lenObserved, const double *prev, double *next, unsigned lenUnfolded, bool performSmoothing) const |
|
Matrix< double > | unfoldingMatrix0 (const double *unfolded, const double *yhat) const |
|
Matrix< double > | errorPropagationMatrix (const double *observed, unsigned lenObserved, const double *unfolded, unsigned lenUnfolded, const double *yHat, double norm, bool smoothLast, unsigned maxiter, double convergenceEps, unsigned *itersMade, bool *converged) const |
|
void | buildUniformInitialApproximation (const double *observed, unsigned lenObserved, std::vector< double > *result) const |
|
void | validateDimensions (unsigned lenObserved, unsigned lenUnfold) const |
|
|
static double | probDelta (const double *prev, const double *next, const unsigned len) |
|
static Matrix< double > | observationCovariance (const double *yhat, unsigned lenObserved, bool isMultinomial) |
|
static void | validateDensity (const double *observ, unsigned lenObserved) |
|
◆ SmoothedEMUnfold1D()
npstat::SmoothedEMUnfold1D::SmoothedEMUnfold1D |
( |
const Matrix< double > & |
responseMatrix, |
|
|
const LocalPolyFilter1D & |
filter, |
|
|
bool |
useConvolutions, |
|
|
bool |
useMultinomialCovariance = false , |
|
|
bool |
smoothLastIter = true , |
|
|
double |
convergenceEpsilon = 1.0e-10 , |
|
|
unsigned |
maxIterations = 100000U |
|
) |
| |
The constructor arguments are:
responseMatrix – Naturally, the problem response matrix.
filter – The filter to use for smoothing the unfolded values. This object will not make a copy of the filter. It is the responsibility of the caller to ensure that the argument filter exists while this object is in use.
useConvolutions – If "true", the code will call the "convolve" method of the filter rather than its "filter" method.
useMultinomialCovariance – Specifies whether we should use multinomial distribution to estimate covariance of fitted observations (otherwise Poisson assumption is used).
smoothLastIter – If "false", smoothing will not be applied after the last iteration. Setting this parameter to "false" is not recommended for production results because it is unclear how to compare such results with models.
convergenceEpsilon – Convergence criterion parameter for various iterations.
maxIterations – Maximum number of iterations allowed (both for the expectation-maximization iterations and for the code estimating the error propagation matrix).
◆ convergenceEpsilon()
double npstat::SmoothedEMUnfold1D::convergenceEpsilon |
( |
| ) |
const |
|
inline |
Simple inspector of object properties
◆ lastEPIterations()
unsigned npstat::SmoothedEMUnfold1D::lastEPIterations |
( |
| ) |
const |
|
inline |
The last number of iterations used to calculate the error propagation matrix
◆ lastNIterations()
unsigned npstat::SmoothedEMUnfold1D::lastNIterations |
( |
| ) |
const |
|
inline |
Returns the last number of iterations used to calculate the unfolded results. This number will be filled after each "unfold" call.
◆ lastSmoothingNormfactor()
double npstat::SmoothedEMUnfold1D::lastSmoothingNormfactor |
( |
| ) |
const |
|
inline |
The normalization factor applied during the last smoothing step
◆ setConvergenceEpsilon()
void npstat::SmoothedEMUnfold1D::setConvergenceEpsilon |
( |
double |
eps | ) |
|
Change the convergence criterion
◆ setMaxIterations()
void npstat::SmoothedEMUnfold1D::setMaxIterations |
( |
const unsigned |
u | ) |
|
|
inline |
Change maximum number of allowed iterations
◆ smoothLastIteration()
void npstat::SmoothedEMUnfold1D::smoothLastIteration |
( |
const bool |
b | ) |
|
|
inline |
Switch between smoothing/not smoothing the last iteration
◆ unfold()
virtual bool npstat::SmoothedEMUnfold1D::unfold |
( |
const double * |
observed, |
|
|
unsigned |
lenObserved, |
|
|
const Matrix< double > * |
observationCovarianceMatrix, |
|
|
double * |
unfolded, |
|
|
unsigned |
lenUnfolded, |
|
|
Matrix< double > * |
unfoldedCovarianceMatrix |
|
) |
| |
|
virtual |
The main unfolding method. The structure of the covariance matrix of observations (if provided) will be ignored for optimizing the unfolded values – it is only used to evaluate their covariance. The "unfoldedCovarianceMatrix" parameter can be NULL in which case the corresponding calculation is not performed (which saves some CPU time).
Implements npstat::AbsUnfold1D.
◆ update()
void npstat::SmoothedEMUnfold1D::update |
( |
const double * |
observed, |
|
|
unsigned |
lenObserved, |
|
|
const double * |
prev, |
|
|
double * |
next, |
|
|
unsigned |
lenUnfolded, |
|
|
bool |
performSmoothing |
|
) |
| const |
|
protected |
Single expectation-maximization (a.k.a. D'Agostini) iteration
◆ useMultinomialCovariance()
void npstat::SmoothedEMUnfold1D::useMultinomialCovariance |
( |
const bool |
b | ) |
|
|
inline |
Switch between multinomial/Poisson covariance for observed space
The documentation for this class was generated from the following file:
|