PRCEvaluation.h

Go to the documentation of this file.
00001 /*
00002  * This program is free software; you can redistribute it and/or modify
00003  * it under the terms of the GNU General Public License as published by
00004  * the Free Software Foundation; either version 3 of the License, or
00005  * (at your option) any later version.
00006  *
00007  * Written (W) 2011 Sergey Lisitsyn
00008  * Copyright (C) 2011 Berlin Institute of Technology and Max-Planck-Society
00009  */
00010 
00011 #ifndef PRCEVALUATION_H_
00012 #define PRCEVALUATION_H_
00013 
00014 #include <shogun/evaluation/BinaryClassEvaluation.h>
00015 
00016 namespace shogun
00017 {
00018 
00019 class CLabels;
00020 
00027 class CPRCEvaluation: public CBinaryClassEvaluation
00028 {
00029 public:
00031     CPRCEvaluation() :
00032         CBinaryClassEvaluation(), m_PRC_graph(NULL),
00033         m_auPRC(0.0), m_PRC_length(0), m_computed(false) {};
00034 
00036     virtual ~CPRCEvaluation();
00037 
00039     virtual inline const char* get_name() const { return "PRCEvaluation"; };
00040 
00046     virtual float64_t evaluate(CLabels* predicted, CLabels* ground_truth);
00047 
00048     inline EEvaluationDirection get_evaluation_direction()
00049     {
00050         return ED_MAXIMIZE;
00051     }
00052 
00056     float64_t get_auPRC();
00057 
00061     SGMatrix<float64_t> get_PRC();
00062 
00063 protected:
00064 
00066     float64_t* m_PRC_graph;
00067 
00069     float64_t m_auPRC;
00070 
00072     int32_t m_PRC_length;
00073 
00075     bool m_computed;
00076 };
00077 
00078 }
00079 
00080 #endif /* PRCEVALUATION_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation