Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

Analyzer.h

Go to the documentation of this file.
00001 #ifndef ANALYZER_H
00002 #define ANALYZER_H
00003 
00004 #include <list>
00005 #include <matrix/newmatio.h>
00006 #include <matrix/newmat.h>
00007 #include <matrix/newmatap.h>
00008 #include "ExampleModel.h"
00009 #include "ReferenceModel.h"
00010 
00011 using namespace std;
00012 
00013 namespace model {
00014 
00033         class Analyzer {
00034         private:
00035                 Matrix m_ExampleData;                           // Wikipedia: X matrix
00036                 Matrix m_mean;                                          // Wikipedia: u Vector
00037                 Matrix m_AdjustedData;                          // Wikipedia: B matrix
00038                 Matrix m_Covariance;                            // Wikipedia: C matrix - NEWMAT: D matrix
00039                 SymmetricMatrix m_EigenValues;          // Wikipedia: D matrix - NEWMAT: A matrix
00040                 Matrix m_EigenVectors;                          // Wikipedia: V matrix
00041                 Matrix m_TotalEnergy;                           // Wikipedia: g Vector
00042                 Matrix m_Components;                            // Wikipedia: W Matrix
00043                 Matrix m_Transformation;                        // Wikipedia: Y Matrix
00044                 int N,M;
00045                 ReferenceModel m_refModel;
00046 
00047         public:
00048                 Analyzer();
00049                 ~Analyzer();
00050 
00063                 enum e_PCAMode { 
00064                         ALL, 
00065                         JACOBI, 
00066                         HOUSEHOLDER, 
00067                         OTHER 
00068                 };
00069 
00070                 // copy operations
00071                 Analyzer(const Analyzer& other);
00072                 Analyzer& operator=(const Analyzer& other);
00073 
00074                 void mergeData(ReferenceModel refModel, vector<ExampleModel*> lmodels, int size);
00075                 void mergeData(ReferenceModel refModel, vector<ExampleModel*> lmodels);
00076                 void mean();
00077                 void adjust();
00078                 void covariance();
00079                 void findComponents();
00080                 void findComponents(e_PCAMode mode);
00081                 void selectComponents();
00082                 void computeEnergy();
00083                 //void sortComponents();
00084                 void setData(Matrix data);
00085                 void transformation();
00086 
00087                 int getInputDimension();
00088                 ReferenceModel getModel();
00089                 ReferenceModel getModel(Matrix input);
00090 
00091                 bool save(char* filename);
00092                 bool load(char* filename);
00093         };
00094 
00100 }
00101 #endif //ANALYZER_H

Generated on Tue Apr 17 09:39:11 2007 for PCG Library by  doxygen 1.3.9.1