00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00038 #ifndef MARSYAS_CLASSIFICATIONREPORT_H
00039 #define MARSYAS_CLASSIFICATIONREPORT_H
00040
00041 #include "MarSystem.h"
00042
00043
00044 namespace Marsyas
00045 {
00046
00047
00048 typedef struct
00049 {
00050 mrs_natural instances;
00051 mrs_natural correctInstances;
00052 mrs_real kappa;
00053 mrs_real meanAbsoluteError;
00054 mrs_real rootMeanSquaredError;
00055 mrs_real relativeAbsoluteError;
00056 mrs_real rootRelativeSquaredError;
00057 }summaryStatistics;
00058
00059 typedef struct
00060 {
00061
00062
00063 mrs_real sumClass;
00064 mrs_real sumSqrClass;
00065 mrs_real sumClassPredicted;
00066 mrs_real sumPredicted;
00067 mrs_real sumSqrPredicted;
00068 mrs_real withClass;
00069 } RegressionCorrelationCalculate;
00070
00071 class ClassificationReport: public MarSystem
00072 {
00073 private:
00074 void addControls();
00075 void myUpdate(MarControlPtr sender);
00076
00077 realvec confusionMatrix;
00078 std::string classNames;
00079
00080 summaryStatistics computeSummaryStatistics(const realvec& mat);
00081 RegressionCorrelationCalculate regCorr;
00082
00083 public:
00084 ClassificationReport(std::string name);
00085 ~ClassificationReport();
00086 MarSystem* clone()const;
00087
00088 void myProcess(realvec& in, realvec& out);
00089 };
00090 }
00091 #endif