123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- /**
- * @file KCGPLaplaceOneVsAll.h
- * @author Erik Rodner
- * @date 12/10/2009
- */
- #ifndef _NICE_OBJREC_KCGPLAPLACEONEVSALLINCLUDE
- #define _NICE_OBJREC_KCGPLAPLACEONEVSALLINCLUDE
- #include <vector>
- #include "vislearning/classifier/classifierbase/KernelClassifier.h"
- #include "vislearning/classifier/kernelclassifier/KCGPLaplace.h"
- #include "vislearning/classifier/kernelclassifier/LaplaceApproximation.h"
- #include "vislearning/regression/gpregression/modelselcrit/genericGPModelSelection.h"
- #include "vislearning/classifier/kernelclassifier/LikelihoodFunction.h"
- namespace OBJREC
- {
- #undef ROADWORKS
- #define ROADWORKS fthrow(NICE::Exception, "Persistent interface not implemented!");
- /** @class KCGPLaplaceOneVsAll
- * One vs. All GP Laplace classifier with joint optimization
- * of kernel parameters
- *
- * @author Erik Rodner
- */
- class KCGPLaplaceOneVsAll : public KernelClassifier
- {
- protected:
- NICE::Config confCopy;
- std::string confSection;
- bool optimizeParameters;
- bool verbose;
- int maxIterations;
- std::vector<LaplaceApproximation *> laplaceApproximations;
- LikelihoodFunction *likelihoodFunction;
- NICE::VVector ySetZeroMean;
- NICE::VectorT<int> classnos;
- //GPMSCLooLikelihoodRegression *modelselcrit;
- bool useLooParameters;
- public:
- /** simple constructor */
- KCGPLaplaceOneVsAll ( const NICE::Config *conf, Kernel *kernelFunction = NULL, const std::string & section = "KCGPLaplaceOneVsAll" );
- /** simple destructor */
- virtual ~KCGPLaplaceOneVsAll();
- /** teach the classifier with a kernel matrix and the corresponding class labels @param y ! */
- void teach ( KernelData *kernelData, const NICE::Vector & y );
- /** classify an example by using its kernel values with the training set,
- be careful with the order in @param kernelVector */
- ClassificationResult classifyKernel ( const NICE::Vector & kernelVector, double kernelSelf ) const;
- void restore ( std::istream&, int )
- {
- ROADWORKS
- };
- void store ( std::ostream&, int ) const
- {
- ROADWORKS
- };
- void clear()
- {
- ROADWORKS
- };
- };
- #undef ROADWORKS
- }
- #endif
|