123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- #ifndef KCGPLAPLACEINCLUDE
- #define KCGPLAPLACEINCLUDE
- #include "vislearning/classifier/classifierbase/KernelClassifier.h"
- #include "vislearning/math/kernels/ParameterizedKernel.h"
- #include "vislearning/classifier/kernelclassifier/LaplaceApproximation.h"
- #include "vislearning/classifier/kernelclassifier/LikelihoodFunction.h"
- #undef ROADWORKS
- #define ROADWORKS fthrow(NICE::Exception, "Persistent interface not implemented!");
- namespace OBJREC
- {
- class KCGPLaplace : public KernelClassifier
- {
- protected:
- enum
- {
- OPTIMIZATION_METHOD_RASMUSSEN = 0,
- OPTIMIZATION_METHOD_TRUSTREGION
- };
- int optimizationMethod;
- bool verbose;
- bool optimizeParameters;
- NICE::Vector y;
- LaplaceApproximation laplaceApproximation;
- LikelihoodFunction *likelihoodFunction;
- public:
-
- KCGPLaplace ( const NICE::Config *conf, Kernel *kernel = NULL, const std::string & section = "KCGPLaplace" );
-
- KCGPLaplace ( const KCGPLaplace & src );
-
- virtual ~KCGPLaplace();
-
- void teach ( KernelData *kernelData, const NICE::Vector & y );
-
- virtual ClassificationResult classifyKernel ( const NICE::Vector & kernelVector, double kernelSelf ) const;
-
- KCGPLaplace *clone() const;
- void restore ( std::istream&, int )
- {
- ROADWORKS
- };
- void store ( std::ostream&, int ) const
- {
- ROADWORKS
- };
- void clear()
- {
- ROADWORKS
- };
- };
- }
- #undef ROADWORKS
- #endif
|