MTK++ Latest version: 0.2.0

pls.h
Go to the documentation of this file.
00001 
00033 #ifndef PLS_H
00034 #define PLS_H
00035 
00036 #include <iostream>
00037 #include <string>
00038 #include <vector>
00039 #include <fstream>
00040 #include <iomanip>
00041 #include <stdlib.h>
00042 #include <sstream>
00043 #include <math.h>
00044 
00045 #include "Utils/constants.h"
00046 #include "Utils/object.h"
00047 #include "BaseStats.h"
00048 
00049 // - BOOST - //
00050 #include <boost/numeric/ublas/symmetric.hpp>
00051 #include <boost/numeric/ublas/matrix.hpp>
00052 #include <boost/numeric/ublas/io.hpp>
00053 #include <boost/numeric/ublas/vector.hpp>
00054 #include <boost/numeric/ublas/banded.hpp> // for diagonal matrix
00055 #include <boost/numeric/bindings/blas/blas3.hpp>
00056 #include "boost/numeric/bindings/traits/ublas_matrix.hpp"
00057 #include "boost/numeric/bindings/traits/ublas_vector.hpp"
00058 
00059 #include "table.h"
00060 
00061 namespace ublas  = boost::numeric::ublas;
00062 namespace blas   = boost::numeric::bindings::blas;
00063 
00064 namespace MTKpp
00065 {
00066 
00067 class sheet;
00068 //class table;
00069 
00070 // ============================================================
00071 // Class : pls()
00072 // ------------------------------------------------------------
00078 // ============================================================
00079 class pls : public BaseStats
00080 {
00081 public:
00082 
00086     pls();
00087 
00097     pls(table<double>* Y, table<double>* X, std::string method, int nlvs, std::string cv,
00098         bool& bError);
00099 
00110     pls(table<double>* Y, table<double>* X, std::string method, int nlvs, std::string cv,
00111         sheet* output, bool& bError);
00112 
00124     pls(std::string Y, std::string X, sheet* S, std::string method, int nlvs,
00125         std::string cv, sheet* output, bool& bError);
00126 
00128     //virtual ~pls();
00129 
00134     void run(bool& bError);
00135 
00140     void runCV(bool& bError);
00141 
00146     void setX(table<double>* x);
00147 
00152     void setY(table<double>* y);
00153 
00158     void setMethod(std::string g);
00159 
00164     void setMaxIter(int i);
00165 
00170     void setEpsilon(double e);
00171 
00176     void setCV(std::string c);
00177 
00182     void setNITER(int i);
00183 
00188     void setNTEST(int i);
00189 
00194     void setSEED(int s);
00195 
00200     void setNLV(int l);
00201 
00206     void setOutModel(sheet* s);
00207 
00208 protected: // Functions
00209 
00247     int kernelPLS();
00248 
00249 protected: // Data
00263     table<double>* itsX;
00264 
00278     table<double>* itsY;
00279 
00283     unsigned int YRows;
00284 
00288     unsigned int XColumns;
00289 
00296     std::string itsMethod;
00297 
00301     unsigned int maxIter;
00302 
00306     double epsilon;
00307 
00315     std::string CV;
00316 
00321     unsigned int nEXT;
00322 
00326     unsigned int nITER;
00327 
00336     unsigned int nTEST;
00337 
00341     int SEED;
00342 
00346     unsigned int nLV;
00347 
00351     sheet* outModel;
00352 };
00353 
00354 } // MTKpp namespace
00355 
00356 #endif // PLS_H

Generated on Fri Dec 23 2011 09:28:51 for MTK++ by Doxygen 1.7.5.1