00001 #ifndef PLS_H_ 00002 #define PLS_H_ 00003 00004 #include <Matrix.h> 00005 #include <vector> 00006 00007 using namespace std; 00008 00010 class PLS 00011 { 00012 00013 public: 00014 00015 static const double EPSILON = 1e-12; 00016 00018 PLS(); 00019 00021 virtual ~PLS(); 00022 00034 void LoadData(double ** data, int landmarks, int dimensions, int individuals, vector<int> leftBlock, vector<int> rightBlock); 00035 00046 void LoadData(double ** left, double ** right, int lcols, int rcols, int rows); 00047 00060 void LoadData(double ** data, double ** variables, int numvar, int landmarks, int dimensions, int individuals); 00061 00063 void PerformPLS(); 00064 00066 void PrintResults(); 00067 00070 bool IsCalculated(); 00071 00072 00073 private: 00074 00075 int m_landmarks; 00076 int m_dimensions; 00077 int m_individuals; 00078 00079 bool m_calculated; 00080 int m_rows; 00081 Matrix<double> m_data; 00082 Matrix<double> m_leftBlock; 00083 Matrix<double> m_rightBlock; 00084 Matrix<double> m_covMatrix; 00085 00086 Matrix<double> m_singularValues; 00087 Matrix<double> m_leftSingularWarps; 00088 Matrix<double> m_rightSingularWarps; 00089 Matrix<double> m_leftSingularWarpScores; 00090 Matrix<double> m_rightSingularWarpScores; 00091 00092 }; 00093 00094 00095 #endif