123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- /**
- * @file KCOneVsAll.h
- * @author Erik Rodner
- * @date 12/10/2009
- */
- #ifndef _NICE_OBJREC_KCONEVSALLINCLUDE
- #define _NICE_OBJREC_KCONEVSALLINCLUDE
- #include "vislearning/classifier/classifierbase/KernelClassifier.h"
- namespace OBJREC
- {
- #undef ROADWORKS
- #define ROADWORKS fthrow(NICE::Exception, "Persistent interface not implemented!");
- /** @class KCOneVsAll
- * One vs. All interface for kernel classifiers
- *
- * @author Erik Rodner
- */
- class KCOneVsAll : public KernelClassifier
- {
- protected:
- std::vector< std::pair<int, KernelClassifier *> > classifiers;
- const KernelClassifier *prototype;
- double noiseSigma;
- bool verbose;
- public:
- /** simple constructor */
- KCOneVsAll ( const NICE::Config *conf, const KernelClassifier *prototype, const std::string & section = "KCOneVsAll" );
- /** simple destructor */
- virtual ~KCOneVsAll();
- /** 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
|