|
#include <MultiscaleEMUnfold1D.hh>
|
| MultiscaleEMUnfold1D (const Matrix< double > &responseMatrix, const LocalPolyFilter1D &filter, int symbetaPower, double maxDegree, double xMinUnfolded, double xMaxUnfolded, const BoundaryHandling &filterBoundaryMethod, double minBandwidth, double maxBandwidth, unsigned nFilters, unsigned itersPerFilter, bool useConvolutions, bool useMultinomialCovariance=false, bool smoothLastIter=true, double convergenceEpsilon=1.0e-10, unsigned maxIterations=100000U) |
|
| 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 |
|
|
typedef AbsUnfold1D | Base |
|
static double | probDelta (const double *prev, const double *next, const unsigned len) |
|
static Matrix< double > | observationCovariance (const double *yhat, unsigned lenObserved, bool isMultinomial) |
|
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 void | validateDensity (const double *observ, unsigned lenObserved) |
|
In the situations with narrow response matrix, this class might be able to speed up convergence of the expectation-maximization iterations (in comparison with SmoothedEMUnfold1D). This is done by performing initial iterations with filters that have wider bandwidth. The maximum bandwidth of such filters should be comparable with the size of typical structures in the unfolded distribution, while the minimum bandwidth should be just slightly above the bandwidth of the final filter. The bandwidth is progressively reduced in the iteration process.
Note that construction of additional filters is itself rather CPU-intensive. Once constructed, the filters are memoized. It makes sense to use this code instead of SmoothedEMUnfold1D only if you plan to unfold multiple distributions.
◆ MultiscaleEMUnfold1D()
npstat::MultiscaleEMUnfold1D::MultiscaleEMUnfold1D |
( |
const Matrix< double > & |
responseMatrix, |
|
|
const LocalPolyFilter1D & |
filter, |
|
|
int |
symbetaPower, |
|
|
double |
maxDegree, |
|
|
double |
xMinUnfolded, |
|
|
double |
xMaxUnfolded, |
|
|
const BoundaryHandling & |
filterBoundaryMethod, |
|
|
double |
minBandwidth, |
|
|
double |
maxBandwidth, |
|
|
unsigned |
nFilters, |
|
|
unsigned |
itersPerFilter, |
|
|
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 a responsibility of the caller to ensure that the argument filter exists while this object is in use.
symbetaPower – Before running the standard expectation maxDegree maximization iterations with the filter xMinUnfolded provided by the previous argument, the xMaxUnfolded code will run iterations with a family filterBoundaryMethod of filters created by the "symbetaLOrPEFilter1D" function. These parameters will be passed to the "symbetaLOrPEFilter1D" call.
minBandwidth – Minimum bandwidth for the extra filters.
maxBandwidth – Maximum bandwidth for the extra filters.
nFilters – Number of extra filters. Logarithms of the bandwidth values of these filters will be equidistant.
itersPerFilter – Number of expectation-maximization iterations to perform per extra filter. These additional filters will be used sequentially, in the order of decreasing bandwidth.
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).
The documentation for this class was generated from the following file:
|