Belle II Software development
DecorrelationMatrix< Ndims > Class Template Reference

Class holding a Matrix that can be used to decorrelate input data to Machine Learning classifiers. More...

#include <DecorrelationMatrix.h>

Public Types

using MatrixT = Eigen::Matrix< double, Ndims, Ndims, Eigen::RowMajor >
 typedef for consistent type across class
 

Public Member Functions

 DecorrelationMatrix (const MatrixT &matrix=MatrixT::Identity())
 default constructor: initializes to identity matrix or to passed matrix
 
 DecorrelationMatrix (const DecorrelationMatrix &matrix)=default
 copy constructor
 
DecorrelationMatrixoperator= (const DecorrelationMatrix &rhs)=default
 assignment operator
 
const MatrixTgetMatrix () const
 get the currently stored matrix
 
void calculateDecorrMatrix (std::array< std::vector< double >, Ndims > inputData, bool normalise=true)
 calculate the transformation matrix that when applied to the input data yields linearly uncorrelated data.
 
void calculateDecorrMatrix (const MatrixT &covMatrix, bool normalise=true)
 calculate the matrix that can be used to decorrelate the data that yield the passed covariance matrix.
 
std::vector< double > decorrelate (const std::vector< double > &inputVec) const
 "decorrelate" one measurement (i.e.
 
std::vector< double > decorrelate (const std::array< double, Ndims > &inputs) const
 "decorrelate" one measurement (i.e.
 
std::array< std::vector< double >, Ndims > decorrelate (const std::array< std::vector< double >, Ndims > &inputMat) const
 decorrelate M measurements (i.e.
 
std::string print () const
 print the matrix to a string.
 
bool readFromStream (std::istream &is)
 read from stream.
 

Private Attributes

MatrixT m_matrix
 internal matrix holding the data
 

Detailed Description

template<size_t Ndims>
class Belle2::DecorrelationMatrix< Ndims >

Class holding a Matrix that can be used to decorrelate input data to Machine Learning classifiers.

At the moment only the dimension is templated and defaults to Ndims = 9, as it will be mainly used for ThreeHitFilters which have at the moment only 9 inputs.

Definition at line 36 of file DecorrelationMatrix.h.

Member Typedef Documentation

◆ MatrixT

using MatrixT = Eigen::Matrix<double, Ndims, Ndims, Eigen::RowMajor>

typedef for consistent type across class

Definition at line 39 of file DecorrelationMatrix.h.

Constructor & Destructor Documentation

◆ DecorrelationMatrix()

DecorrelationMatrix ( const MatrixT matrix = MatrixT::Identity())
inlineexplicit

default constructor: initializes to identity matrix or to passed matrix

Definition at line 42 of file DecorrelationMatrix.h.

42: m_matrix(matrix) { }
MatrixT m_matrix
internal matrix holding the data

Member Function Documentation

◆ getMatrix()

const MatrixT & getMatrix ( ) const
inline

get the currently stored matrix

Definition at line 50 of file DecorrelationMatrix.h.

Member Data Documentation

◆ m_matrix

MatrixT m_matrix
private

internal matrix holding the data

Definition at line 89 of file DecorrelationMatrix.h.


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