12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- /**
- * @file RegressionAlgorithm.h
- * @brief interface for a regression algorithm
- * @author Erik Rodner
- * @date 12/09/2009
- */
- #ifndef REGRESSIONALGORITHMINCLUDE
- #define REGRESSIONALGORITHMINCLUDE
- #include "core/vector/VVector.h"
- namespace OBJREC {
-
- #define ROADWORKS fthrow(Exception, "Persistent Interface: not yet implemented.");
- /** interface for a regression algorithm */
- class RegressionAlgorithm : public NICE::Persistent
- {
- protected:
- public:
-
- /** simple constructor */
- RegressionAlgorithm();
-
- /** simple destructor */
- virtual ~RegressionAlgorithm();
- /** learn parameters/models/whatever using a set of vectors and
- * their corresponding function values
- */
- virtual void teach ( const NICE::VVector & x, const NICE::Vector & y ) = 0;
- /** predict the function value for \c x */
- virtual double predict ( const NICE::Vector & x ) = 0;
-
- /** persistent interface */
- virtual void restore (std::istream & is, int format = 0) { ROADWORKS };
- virtual void store (std::ostream & os, int format = 0) const { ROADWORKS };
- virtual void clear () { ROADWORKS };
- /** clone function */
- virtual RegressionAlgorithm *clone(void) const {
- fthrow(Exception, "clone() not yet implemented!\n");
- }
- };
- #undef ROADWORKS
- }
- #endif
|