12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- #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(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
|