27 #ifndef GRT_PRINCIPAL_COMPONENT_ANALYSIS_HEADER 28 #define GRT_PRINCIPAL_COMPONENT_ANALYSIS_HEADER 30 #include "../../Util/GRTCommon.h" 31 #include "../../CoreModules/MLBase.h" 77 bool computeFeatureVector(
const MatrixFloat &data,Float maxVariance=0.95,
bool normData=
false);
90 bool computeFeatureVector(
const MatrixFloat &data,UINT numPrincipalComponents,
bool normData=
false);
120 virtual bool save( std::fstream &file )
const;
128 virtual bool load( std::fstream &file );
185 virtual bool print( std::string title=
"" )
const;
201 bool computeFeatureVector_(
const MatrixFloat &data,UINT analysisMode);
204 UINT numPrincipalComponents;
213 enum AnalysisMode{MAX_VARIANCE=0,MAX_NUM_PCS};
218 #endif //GRT_PRINCIPAL_COMPONENT_ANALYSIS_HEADER
VectorFloat getEigenValues() const
virtual bool save(const std::string &filename) const
virtual bool print() const
VectorFloat getStdDevVector() const
VectorFloat getMeanVector() const
This class runs the Principal Component Analysis (PCA) algorithm, a dimensionality reduction algorith...
Float getMaxVariance() const
UINT getNumInputDimensions() const
virtual bool load(const std::string &filename)
This is the main base class that all GRT machine learning algorithms should inherit from...
UINT getNumPrincipalComponents() const
VectorFloat getComponentWeights() const