Belle II Software development
|
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 | |
DecorrelationMatrix & | operator= (const DecorrelationMatrix &rhs)=default |
assignment operator | |
const MatrixT & | getMatrix () 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 | |
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.
using MatrixT = Eigen::Matrix<double, Ndims, Ndims, Eigen::RowMajor> |
typedef for consistent type across class
Definition at line 39 of file DecorrelationMatrix.h.
|
inlineexplicit |
default constructor: initializes to identity matrix or to passed matrix
Definition at line 42 of file DecorrelationMatrix.h.
|
inline |
get the currently stored matrix
Definition at line 50 of file DecorrelationMatrix.h.
|
private |
internal matrix holding the data
Definition at line 89 of file DecorrelationMatrix.h.