12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- #ifndef KCGPAPPROXONECLASSINCLUDE
- #define KCGPAPPROXONECLASSINCLUDE
- #include "vislearning/cbaselib/ClassificationResult.h"
- #include "vislearning/classifier/classifierbase/KernelClassifier.h"
- #include "vislearning/math/kernels/Kernel.h"
- #define VARIANCE_DETECTION_MODE 1
- #define MEAN_DETECTION_MODE 2
- namespace OBJREC {
-
- class KCGPApproxOneClass : public KernelClassifier
- {
- protected:
- NICE::Vector matrixDInv;
- NICE::Vector InvDY;
- int mode;
- double staticNoise;
-
- public:
-
-
- KCGPApproxOneClass( const NICE::Config *conf, Kernel *kernel = NULL, const std::string & section = "OneClassGP" );
-
- KCGPApproxOneClass( const KCGPApproxOneClass & src );
-
-
- virtual ~KCGPApproxOneClass();
-
-
- void teach ( KernelData *kernelData, const NICE::Vector & y );
-
- void teach (const LabeledSetVector &teachSet);
-
-
- virtual ClassificationResult classifyKernel ( const NICE::Vector & kernelVector, double kernelSelf ) const;
-
-
- KCGPApproxOneClass *clone() const;
- void restore(std::istream&, int);
- void store(std::ostream&, int) const;
- void clear();
- };
- }
- #endif
|