npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0
emsunfold::SmoothedEMSparseUnfoldND< Matrix > Class Template Reference
Inheritance diagram for emsunfold::SmoothedEMSparseUnfoldND< Matrix >:
emsunfold::AbsSparseUnfoldND< Matrix >

Public Types

typedef AbsSparseUnfoldND< Matrix > Base
 
typedef Base::response_matrix_type response_matrix_type
 
typedef Base::input_covariance_type input_covariance_type
 
typedef Base::output_covariance_type output_covariance_type
 
typedef Base::filter_type filter_type
 
- Public Types inherited from emsunfold::AbsSparseUnfoldND< Matrix >
typedef Matrix response_matrix_type
 
typedef Eigen::DiagonalMatrix< double, Eigen::Dynamic > input_covariance_type
 
typedef Matrix output_covariance_type
 
typedef AbsSparseUnfoldingFilterND filter_type
 

Public Member Functions

 SmoothedEMSparseUnfoldND (const response_matrix_type &responseMatrix, const filter_type &filter, const npstat::ArrayShape &observedShape, bool useConvolutions, bool smoothLastIter=true, double convergenceEpsilon=1.0e-10, unsigned maxIterations=100000U)
 
void setMaxIterations (const unsigned u)
 
void useMultinomialCovariance (bool)
 
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 npstat::ArrayND< double > &observed, const input_covariance_type *observationCovarianceMatrix, npstat::ArrayND< double > *unfolded, output_covariance_type *unfoldedCovarianceMatrix)
 
- Public Member Functions inherited from emsunfold::AbsSparseUnfoldND< Matrix >
 AbsSparseUnfoldND (const response_matrix_type &responseMatrix, const npstat::ArrayShape &unfoldedShape, const npstat::ArrayShape &observedShape)
 
 AbsSparseUnfoldND (const response_matrix_type &responseMatrix, const unsigned *unfoldedShape, unsigned unfoldedDim, const unsigned *observedShape, unsigned observedDim)
 
const response_matrix_type & responseMatrix () const
 
const npstat::ArrayND< double > & efficiency () const
 
virtual void setInitialApproximation (const npstat::ArrayND< double > &a)
 
virtual void clearInitialApproximation ()
 
virtual const npstat::ArrayND< double > & getInitialApproximation () const
 
virtual void setFilter (const filter_type *f)
 
virtual const filter_typegetFilter (bool throwIfNull=false) const
 
virtual void useConvolutions (const bool b)
 
bool usingConvolutions () const
 
npstat::ArrayShape getObservedShape () const
 
npstat::ArrayShape getUnfoldedShape () const
 
void validateUnfoldedShape (const npstat::ArrayND< double > &u) const
 
void validateUnfoldedShape (const npstat::ArrayShape &uShape) const
 
void validateObservedShape (const npstat::ArrayND< double > &o) const
 
void validateObservedShape (const npstat::ArrayShape &oShape) const
 

Protected Member Functions

void update (const npstat::ArrayND< double > &observed, const npstat::ArrayND< double > *prev, npstat::ArrayND< double > *next, bool performSmoothing) const
 
- Protected Member Functions inherited from emsunfold::AbsSparseUnfoldND< Matrix >
void buildUniformInitialApproximation (const npstat::ArrayND< double > &o, npstat::ArrayND< double > *r) const
 

Constructor & Destructor Documentation

◆ SmoothedEMSparseUnfoldND()

template<class Matrix >
emsunfold::SmoothedEMSparseUnfoldND< Matrix >::SmoothedEMSparseUnfoldND ( const response_matrix_type &  responseMatrix,
const filter_type filter,
const npstat::ArrayShape observedShape,
bool  useConvolutions,
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 a responsibility of the caller to ensure that the argument filter exists while this object is in use.

observedShape – Expected shape of the observed data. The array of observations provided in all subsequent calls of the "unfold" method must have this shape.

useConvolutions – If "true", the code will call the "convolve" method of the filter rather than its "filter" method.

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).

Member Function Documentation

◆ convergenceEpsilon()

template<class Matrix >
double emsunfold::SmoothedEMSparseUnfoldND< Matrix >::convergenceEpsilon ( ) const
inline

Simple inspector of object properties

◆ lastEPIterations()

template<class Matrix >
unsigned emsunfold::SmoothedEMSparseUnfoldND< Matrix >::lastEPIterations ( ) const
inline

The last number of iterations used to calculate the error propagation matrix

◆ lastNIterations()

template<class Matrix >
unsigned emsunfold::SmoothedEMSparseUnfoldND< Matrix >::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()

template<class Matrix >
double emsunfold::SmoothedEMSparseUnfoldND< Matrix >::lastSmoothingNormfactor ( ) const
inline

The normalization factor applied during the last smoothing step

◆ setConvergenceEpsilon()

template<class Matrix >
void emsunfold::SmoothedEMSparseUnfoldND< Matrix >::setConvergenceEpsilon ( double  eps)

Change the convergence criterion

◆ setMaxIterations()

template<class Matrix >
void emsunfold::SmoothedEMSparseUnfoldND< Matrix >::setMaxIterations ( const unsigned  u)
inline

Change maximum number of allowed iterations

◆ smoothLastIteration()

template<class Matrix >
void emsunfold::SmoothedEMSparseUnfoldND< Matrix >::smoothLastIteration ( const bool  b)
inline

Switch between smoothing/not smoothing the last iteration

◆ unfold()

template<class Matrix >
virtual bool emsunfold::SmoothedEMSparseUnfoldND< Matrix >::unfold ( const npstat::ArrayND< double > &  observed,
const input_covariance_type *  observationCovarianceMatrix,
npstat::ArrayND< double > *  unfolded,
output_covariance_type *  unfoldedCovarianceMatrix 
)
virtual

The main unfolding method

Implements emsunfold::AbsSparseUnfoldND< Matrix >.

◆ update()

template<class Matrix >
void emsunfold::SmoothedEMSparseUnfoldND< Matrix >::update ( const npstat::ArrayND< double > &  observed,
const npstat::ArrayND< double > *  prev,
npstat::ArrayND< double > *  next,
bool  performSmoothing 
) const
protected

Single expectation-maximization (a.k.a. D'Agostini) iteration

◆ useMultinomialCovariance()

template<class Matrix >
void emsunfold::SmoothedEMSparseUnfoldND< Matrix >::useMultinomialCovariance ( bool  )
inline

This method is included for compatibility with the npstat::SmoothedEMUnfoldND class. The call will be ignored.


The documentation for this class was generated from the following file: