1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- /**
- * @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<double> 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
|