1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- /**
- * @file RegressionAlgorithmKernel.h
- * @brief interface for a regression algorithm which is based on kernels
- * @author Erik Rodner
- * @date 12/09/2009
- */
- #ifndef REGRESSIONALGORITHMKERNELINCLUDE
- #define REGRESSIONALGORITHMKERNELINCLUDE
- #include "vislearning/math/kernels/Kernel.h"
- #include "vislearning/math/kernels/KernelData.h"
- #include "RegressionAlgorithm.h"
- namespace OBJREC
- {
- /** interface for a regression algorithm which is based on kernels */
- class RegressionAlgorithmKernel : public RegressionAlgorithm
- {
- protected:
- NICE::VVector X;
- NICE::Vector y;
- NICE::Config conf;
- Kernel *kernelFunction;
- public:
- /** simple constructor */
- RegressionAlgorithmKernel ( const NICE::Config *conf, Kernel *kernelFunction = NULL );
- /** copy constructor */
- RegressionAlgorithmKernel ( const RegressionAlgorithmKernel & src );
- /** simple destructor */
- virtual ~RegressionAlgorithmKernel();
- /** learn parameters/models/whatever with a kernel matrix (contained in a general structure kernel data)
- * of a set
- * of vectors and the corresponding function values \c y
- */
- virtual void teach ( KernelData *kernelData, const NICE::Vector & y ) = 0;
- /** predict the function value for a vector by using its kernel values with
- * the used training set, be careful with the order in \c kernelVector
- */
- virtual double predictKernel ( const NICE::Vector & kernelVector, double kernelSelf ) = 0;
- // functions to build an interface to RegressionAlgorithm
- /** learn parameters/models/whatever using a set of vectors and
- * their corresponding function values
- */
- void teach ( const NICE::VVector & X, const NICE::Vector & y );
- /** predict the function value for \c x */
- double predict ( const NICE::Vector & x );
- /** clone function */
- virtual RegressionAlgorithmKernel *clone ( void ) const
- {
- fthrow ( NICE::Exception, "clone() not yet implemented!\n" );
- }
- };
- }
- #endif
|