41 #ifndef BPP_NUMERIC_STAT_MVA_PRINCIPALCOMPONENTANALYSIS_H
42 #define BPP_NUMERIC_STAT_MVA_PRINCIPALCOMPONENTANALYSIS_H
45 #include "../../Matrix/Matrix.h"
82 const std::vector<double>& rowW,
83 const std::vector<double>& colW,
86 double tol = 0.0000001,
103 bool centered =
true,
105 double tol = 0.0000001,
106 bool verbose =
true);
The core class of a multivariate analysis.
The matrix template interface.
This class allows to perform a principal component analysis.
static void scale(Matrix< double > &matrix, const std::vector< double > &rowW)
This function allows to center an input matrix from its column means.
PrincipalComponentAnalysis * clone() const
Create a copy of this object and send a pointer to it.
virtual ~PrincipalComponentAnalysis()
const std::vector< double > & getColumnMeans() const
std::vector< double > columnSd_
static void center(Matrix< double > &matrix, const std::vector< double > &rowW)
This function allows to center an input matrix from its column means.
std::vector< double > columnMeans_
PrincipalComponentAnalysis(const Matrix< double > &data, unsigned int nbAxes, const std::vector< double > &rowW, const std::vector< double > &colW, bool centered=true, bool scaled=true, double tol=0.0000001, bool verbose=true)
Build a new PrincipalComponentAnalysis object.
const std::vector< double > & getColumnSd() const