123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- #ifndef _NICE_OBJREC_KCGPREGONEVSALLINCLUDE
- #define _NICE_OBJREC_KCGPREGONEVSALLINCLUDE
- #include "vislearning/classifier/classifierbase/KernelClassifier.h"
- #include "vislearning/regression/gpregression/RegGaussianProcess.h"
- #include "vislearning/math/kernels/TraceApproximation.h"
- #include "vislearning/regression/gpregression/modelselcrit/genericGPModelSelection.h"
- #include <vector>
- namespace OBJREC
- {
- #undef ROADWORKS
- #define ROADWORKS fthrow(NICE::Exception, "Persistent interface not implemented!");
- class KCGPRegOneVsAll : public KernelClassifier
- {
- protected:
-
- std::vector< std::pair<int, RegGaussianProcess *> > classifiers;
-
- const RegGaussianProcess *prototype;
-
- bool optimizeParameters;
-
- bool verbose;
-
- int maxIterations;
- TraceApproximation *traceApproximation;
- GPMSCLooLikelihoodRegression *modelselcrit;
-
- bool useLooParameters;
-
- bool computeUncertainty;
-
- NICE::Matrix choleskyMatrix;
-
- bool calibrateProbabilities;
-
- uint numSamplesCalibration;
- public:
-
- KCGPRegOneVsAll() {};
-
- KCGPRegOneVsAll ( const NICE::Config *conf, Kernel *kernelFunction = NULL, const std::string & section = "KCGPRegOneVsAll" );
-
- KCGPRegOneVsAll ( const KCGPRegOneVsAll &vcova );
-
- virtual ~KCGPRegOneVsAll();
-
- void teach ( KernelData *kernelData, const NICE::Vector & y );
- void teach ( KernelData *kernelData, const std::vector<double> & y );
-
- ClassificationResult classifyKernel ( const NICE::Vector & kernelVector, double kernelSelf ) const;
- void restore ( std::istream&, int );
- void store ( std::ostream&, int ) const;
- void clear();
-
- virtual KCGPRegOneVsAll *clone ( void ) const;
- };
- #undef ROADWORKS
- }
- #endif
|