00001 #ifndef __AMultiClassObjectEvaluator__ 00002 #define __AMultiClassObjectEvaluator__ 00003 00004 00005 00024 #include "RealVector.hpp" 00025 #include "ASeparateFeatureClassifier.hpp" 00026 00027 #include "DataSample.hpp" 00028 00029 class AMultiClassObjectEvaluator 00030 { 00031 private: 00032 00033 int xDimension; 00034 00035 int nclass; 00036 int nmax; 00037 00038 int selected; // selected classifier 00039 00040 ASeparateFeatureClassifier** classifier; // KMean, ..., one or more classes / Object 00041 00042 public: 00043 00044 AMultiClassObjectEvaluator(int nmax, int featureSize); 00045 virtual ~AMultiClassObjectEvaluator(); 00046 00047 virtual void add(ASeparateFeatureClassifier* aclassifier); 00048 00049 00050 virtual int getFeatureSize(){ return xDimension; } 00051 virtual int numberOfClasses(){ return nclass; } 00052 virtual int maxSize(){ return nmax; } 00053 00054 // computation of new parameters 00055 virtual void initializeClasses(DataSample* objectSample); // random preclustering 00056 00057 virtual int getBestClassifier(double value); 00058 virtual int getBestClassifier(RealVector& value); 00059 00060 virtual void start(); 00061 00062 virtual void learn(DataSample* objectSample); 00063 00064 virtual void learn(double value); 00065 virtual void unlearn(double value); 00066 00067 virtual void learn(RealVector& value); 00068 virtual void unlearn(RealVector& value); 00069 00070 virtual void end(); 00071 00072 00073 // priori probability & likelihood 00074 virtual double Pxo(double value); 00075 virtual double Lxo(double value); 00076 00077 virtual double Pxo(RealVector& value); 00078 virtual double Lxo(RealVector& value); 00079 00080 virtual double Po(){ return 1.0/nclass; } // P(O)= 1/<number of classes> 00081 00082 void output(FILE* file); 00083 00084 virtual void output() 00085 { 00086 printf("AMultiClassObjectEvaluator\n"); 00087 } 00088 }; 00089 00090 #endif