123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- /**
- * @file RANSACReg.h
- * @brief Implementation of RANSAC (RANdom SAmple Consensus) for regression purposes
- * @author Frank Prüfer
- * @date 09/10/2013
- */
- #ifndef RANSACREGINCLUDE
- #define RANSACREGINCLUDE
- #include "core/vector/VectorT.h"
- #include "core/vector/MatrixT.h"
- #include "core/basics/Config.h"
- #include "vislearning/regression/regressionbase/RegressionAlgorithm.h"
- namespace OBJREC
- {
- class RANSACReg : public RegressionAlgorithm
- {
- protected:
- /** threshold value for determining when a datum fits a model */
- double threshold;
-
- /** mminimum number of data required to fit the model */
- uint n;
-
- /** number of iterations performed by the algorithm */
- uint iter;
-
- /** vector of model parameters */
- std::vector<double> modelParams;
-
- /** set of data points */
- NICE::VVector dataSet;
-
- /** set of responses according to dataset */
- std::vector<double> labelSet;
-
- public:
- /** simple constructor */
- RANSACReg ( const NICE::Config *conf );
-
- /** copy constructor */
- RANSACReg ( const RANSACReg & src );
-
- /** simple destructor */
- virtual ~RANSACReg();
-
- /** clone function */
- RANSACReg* 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 );
- };
- } //namespace
- #endif
|