npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0
emsunfold Namespace Reference

Classes

class  AbsSparseUnfoldingFilterND
 
class  SparseUnfoldingFilterND
 
class  SparseUnfoldingFilterNDReader
 
class  AbsSparseUnfoldND
 
class  EigenParameters
 
class  SmoothedEMSparseUnfoldND
 
class  SparseUnfoldingBandwidthScannerND
 
class  TrlanDiagnostics
 

Typedefs

typedef gs::StaticReader< SparseUnfoldingFilterNDReaderStaticSparseUnfoldingFilterNDReader
 

Functions

template<class Matrix >
CPP11_auto_ptr< std::vector< Eigen::Triplet< double, typename Matrix::Index > > > pruneCovariance (const Matrix &m, double tol)
 
template<class Matrix >
int trlanEigensystem (const Matrix &covmat, const EigenParameters &params, std::vector< double > *eigenvalues, std::vector< double > *eigenvectors, TrlanDiagnostics *diagnostics)
 

Detailed Description

Namespace "emsunfold" (EMS stands for Expectation-Maximization with Smoothing) is used for classes and functions in the NPStat package which implement EMS unfolding and rely on the Eigen package for sparse linear algebra. See http://eigen.tuxfamily.org/

Typedef Documentation

◆ StaticSparseUnfoldingFilterNDReader

Factory for deserializing filters representable by sparse matrices

Function Documentation

◆ pruneCovariance()

template<class Matrix >
CPP11_auto_ptr<std::vector<Eigen::Triplet<double,typename Matrix::Index> > > emsunfold::pruneCovariance ( const Matrix &  m,
double  tol 
)

This function will prune off-diagonal elements of a sparse symmetric positive-semidefinite matrix which correspond to correlation coefficients smaller in magnitude than "tol". This function will also make sure that the correlation coefficients do not exceed 1 in magnitude.

◆ trlanEigensystem()

template<class Matrix >
int emsunfold::trlanEigensystem ( const Matrix &  covmat,
const EigenParameters params,
std::vector< double > *  eigenvalues,
std::vector< double > *  eigenvectors,
TrlanDiagnostics diagnostics 
)

Determine eigenvalues and eigenvectors of the argument covariance matrix using TRLAN, steered by the parameters given. This function returns the TRLAN error code (status). 0 means everything is OK. Consult the TRLAN user guide for the meaning of other error codes. Note that, even when 0 is returned, the number of eigenpairs actually found could be less than the number of eigenpairs requested and/or tail fraction stopping condition might not be satisfied.

The eigenvalues will be returned in the increasing order. Check diagnostics->nConverged() to see how many of them are returned. Note that the vector of eigenvalues can actually have more elements, but only "diagnostics->nConverged()" of them are valid. Eigenvectors will be placed into "eigenvectors" vector one after another. If the matrix "covmat" has "nrows" rows then &eigenvectors[0] will point to the first eigenvector, &eigenvectors[0] + nrows to the second, etc. The order of eigenvectors corresponds to the order of eigenvalues.