123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- #ifndef _NICE_FPCGPHIKCLASSIFIERNICEINCLUDE
- #define _NICE_FPCGPHIKCLASSIFIERNICEINCLUDE
- #include <string>
- #include <core/basics/Config.h>
- #include <gp-hik-core/GPHIKClassifier.h>
- #include <gp-hik-core/FMKGPHyperparameterOptimization.h>
- #include <gp-hik-core/parameterizedFunctions/ParameterizedFunction.h>
- #include "vislearning/classifier/classifierbase/FeaturePoolClassifier.h"
- namespace OBJREC {
-
- class FPCGPHIK : public FeaturePoolClassifier
- {
- protected:
-
- NICE::GPHIKClassifier * classifier;
-
-
- bool verbose;
-
-
- bool useSimpleBalancing;
- int minSamples;
-
-
- bool performOptimizationAfterIncrement;
- public:
-
- FPCGPHIK( const NICE::Config *conf, const std::string & confSection = "GPHIKClassifier" );
-
-
- virtual ~FPCGPHIK();
-
-
- virtual ClassificationResult classify ( OBJREC::Example & pe );
-
-
- ClassificationResult classify ( const NICE::SparseVector * example );
-
- virtual void train ( OBJREC::FeaturePool & fp, OBJREC::Examples & examples );
-
- void train ( const std::vector< const NICE::SparseVector *> & examples, std::map<int, NICE::Vector> & binLabels );
-
-
-
-
- virtual void restore ( std::istream & is, int format = 0 );
- virtual void store ( std::ostream & os, int format = 0 ) const;
- virtual void clear ();
- virtual FeaturePoolClassifier *clone () const;
-
-
- void predictUncertainty( OBJREC::Example & pe, double & uncertainty );
-
-
- void predictUncertainty( const NICE::SparseVector * example, double & uncertainty );
-
-
-
-
-
- void addExample( const OBJREC::Example & pe, const double & label);
- virtual void addMultipleExamples( OBJREC::Examples & newExamples);
-
- };
- }
- #endif
|