MTK++ Latest version: 0.2.0

ols.h
Go to the documentation of this file.
00001 
00033 #ifndef OLS_H
00034 #define OLS_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 "BaseStats.h"
00047 
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 namespace ublas  = boost::numeric::ublas;
00060 namespace blas   = boost::numeric::bindings::blas;
00061 */
00062 
00063 #include <Eigen/Dense>
00064 using namespace Eigen;
00065 
00066 namespace MTKpp
00067 {
00068 
00069 // ============================================================
00070 // Class : ols()
00071 // ------------------------------------------------------------
00079 // ============================================================
00080 class ols : public BaseStats
00081 {
00082 public:
00086     ols();
00087 
00089     virtual ~ols();
00090 
00099     //std::vector<double> LeastSquaresRegressionLine(ublas::matrix<double>& m1, const int& i1,
00100     //                    ublas::matrix<double>& m2, const int& i2);
00101 
00102     std::vector<double> LeastSquaresRegressionLine(Eigen::Matrix<double, Dynamic, Dynamic>& m1, const int& i1,
00103                         Eigen::Matrix<double, Dynamic, Dynamic>& m2, const int& i2);
00104 
00111     //void run(ublas::matrix<double>& Ys,
00112     //         ublas::matrix<double>& Xs,
00113     //         ublas::matrix<double>& Y_Pred);
00114 
00115     void run(Eigen::Matrix<double, Dynamic, Dynamic>& Ys,
00116              Eigen::Matrix<double, Dynamic, Dynamic>& Xs,
00117              Eigen::Matrix<double, Dynamic, Dynamic>& Y_Pred);
00118 };
00119 
00120 } // MTKpp namespace
00121 
00122 #endif // OLS_H
00123 

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