/** * @file CRSplineReg.h * @brief Implementation of Catmull-Rom-Splines for regression purposes * @author Frank Prüfer * @date 09/03/2013 */ #ifndef CRSPLINEREGINCLUDE #define CRSPLINEREGINCLUDE #include "core/vector/VectorT.h" #include "core/vector/VVector.h" #include "core/vector/MatrixT.h" #include "core/basics/Config.h" #include "vislearning/regression/regressionbase/RegressionAlgorithm.h" namespace OBJREC { class CRSplineReg : public RegressionAlgorithm { protected: /** smoothness parameter */ double tau; /** dimension which is used for sorting the data (maybe use something like PCA to determine this variable) */ uint sortDim; /** set of data points */ NICE::VVector dataSet; /** set of responses according to dataset */ std::vector labelSet; public: /** simple constructor */ CRSplineReg( const NICE::Config *_conf ); /** simple constructor specifying in which dimension data should be sorted*/ CRSplineReg( uint sDim ); /** copy constructor */ CRSplineReg ( const CRSplineReg & src ); /** simple destructor */ virtual ~CRSplineReg(); /** clone function */ CRSplineReg* clone (void) const; /** predict response using simple vector */ double predict ( const NICE::Vector & x ); /** teach whole set at once */ void teach ( const NICE::VVector & dataSet, const NICE::Vector & labelSet ); /** teach one data point at a time */ void teach ( const NICE::Vector & x, const double & y ); }; } //nameospace #endif