yat  0.10.4pre
AUC.h
1 #ifndef _theplu_yat_statistics_auc_
2 #define _theplu_yat_statistics_auc_
3 
4 // $Id: AUC.h 2597 2011-10-30 03:44:57Z peter $
5 
6 /*
7  Copyright (C) 2004 Peter Johansson
8  Copyright (C) 2005, 2006, 2007, 2008 Jari Häkkinen, Peter Johansson
9  Copyright (C) 2011 Peter Johansson
10 
11  This file is part of the yat library, http://dev.thep.lu.se/yat
12 
13  The yat library is free software; you can redistribute it and/or
14  modify it under the terms of the GNU General Public License as
15  published by the Free Software Foundation; either version 3 of the
16  License, or (at your option) any later version.
17 
18  The yat library is distributed in the hope that it will be useful,
19  but WITHOUT ANY WARRANTY; without even the implied warranty of
20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21  General Public License for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with yat. If not, see <http://www.gnu.org/licenses/>.
25 */
26 
27 #include "Score.h"
29 
30 #include <utility>
31 #include <map>
32 
33 namespace theplu {
34 namespace yat {
35 namespace classifier {
36  class Target;
37 }
38 namespace utility {
39  class VectorBase;
40 }
41 namespace statistics {
42 
61  class AUC : public Score
62  {
63 
64  public:
69  AUC(bool absolute=true);
70 
74  double score(const classifier::Target& target,
75  const utility::VectorBase& value) const;
76 
80  double score(const classifier::Target& target,
81  const classifier::DataLookupWeighted1D& value) const;
82 
86  double score(const classifier::Target& target,
87  const utility::VectorBase& value,
88  const utility::VectorBase& weight) const;
89 
90  private:
91  friend class ROC;
92 
93  typedef std::multimap<double, std::pair<bool, double> > MultiMap;
94  double score(const MultiMap&) const;
95  };
96 
97 }}} // of namespace statistics, yat, and theplu
98 
99 #endif

Generated on Mon Nov 11 2013 09:41:44 for yat by  doxygen 1.8.1