/** * @file LinRegression.cpp * @brief Algorithm for linear regression * @author Frank Prüfer * @date 08/13/2013 */ #include "vislearning/regression/linregression/LinRegression.h" #include "core/vector/Algorithms.h" using namespace OBJREC; using namespace std; using namespace NICE; LinRegression::LinRegression(){ dim = 0; } LinRegression::LinRegression(uint dimension){ dim = dimension; } LinRegression::~LinRegression() { } void LinRegression::teach ( const NICE::VVector & x, const NICE::Vector & y ){ if (dim == 0){ //dimension not specified via constructor dim = x[0].size()+1; //use full dimension of data } cerr<<"dim: "<