Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

SeparateGaussianClassifier.hpp

00001 #ifndef __SeparateGaussianClassifier__
00002 #define __SeparateGaussianClassifier__
00003 
00022 #include "ASeparateFeatureClassifier.hpp"
00023 
00024 class SeparateGaussianClassifier : public ASeparateFeatureClassifier
00025 {
00026 protected:
00027 
00028 RealVector*             meanValue;
00029 RealVector*             sigma;
00030 
00031 double                  root2nPI;               // root(2*PI)^nFeature
00032 double                  logroot2nPI;
00033 
00034 double                  sumLogSigma;
00035 double                  productSigma;
00036 
00037 
00038 protected:
00039 
00040 virtual double reducedValue(int i, double featurei)
00041         { return ((featurei-meanValue->get0(i))/(sigma->get0(i)+1e-12)); }
00042 
00043 public:
00044 
00045 
00046 SeparateGaussianClassifier(int n);
00047 virtual ~SeparateGaussianClassifier(){delete meanValue; delete sigma;}
00048 
00049 virtual double distance2(RealVector& featureVector);
00050 
00051 // learning
00052 virtual void start();
00053 
00054 // probability 
00055 virtual double P(RealVector& featureVector);
00056 
00057 // likelihood
00058 virtual double L(RealVector& featureVector);
00059 
00060 virtual void output(FILE* file);
00061 
00062 virtual void output()
00063         {
00064         printf("A Separate Gaussian Classifier(%d)", nFeatures);
00065         }                               
00066 };
00067 
00068 #endif
SourceForge.net Logo
Restoreinpaint sourceforge project `C++/Java Image Processing, Restoration, Inpainting Project'.

Bernard De Cuyper: Open Project Leader: Concept, design and development.
Bernard De Cuyper & Eddy Fraiha 2002, 2003. Bernard De Cuyper 2004. Open and free, for friendly usage only.
Modifications on Belgium ground of this piece of artistic work, by governement institutions or companies, must be notified to Bernard De Cuyper.
bern_bdc@hotmail.com