yat  0.8.3pre
AUC.h
00001 #ifndef _theplu_yat_statistics_auc_ 
00002 #define _theplu_yat_statistics_auc_ 
00003 
00004 // $Id: AUC.h 2597 2011-10-30 03:44:57Z peter $
00005 
00006 /*
00007   Copyright (C) 2004 Peter Johansson
00008   Copyright (C) 2005, 2006, 2007, 2008 Jari Häkkinen, Peter Johansson
00009   Copyright (C) 2011 Peter Johansson
00010 
00011   This file is part of the yat library, http://dev.thep.lu.se/yat
00012 
00013   The yat library is free software; you can redistribute it and/or
00014   modify it under the terms of the GNU General Public License as
00015   published by the Free Software Foundation; either version 3 of the
00016   License, or (at your option) any later version.
00017 
00018   The yat library is distributed in the hope that it will be useful,
00019   but WITHOUT ANY WARRANTY; without even the implied warranty of
00020   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00021   General Public License for more details.
00022 
00023   You should have received a copy of the GNU General Public License
00024   along with yat. If not, see <http://www.gnu.org/licenses/>.
00025 */
00026 
00027 #include "Score.h"
00028 #include "yat/utility/stl_utility.h"
00029 
00030 #include <utility>
00031 #include <map>
00032 
00033 namespace theplu {
00034 namespace yat {
00035 namespace classifier {
00036   class Target;
00037 }
00038 namespace utility {
00039   class VectorBase;
00040 }
00041 namespace statistics {  
00042 
00061   class AUC : public Score
00062   {
00063   
00064   public:
00069     AUC(bool absolute=true);
00070 
00074     double score(const classifier::Target& target, 
00075                  const utility::VectorBase& value) const; 
00076     
00080     double score(const classifier::Target& target, 
00081                  const classifier::DataLookupWeighted1D& value) const; 
00082 
00086     double score(const classifier::Target& target, 
00087                  const utility::VectorBase& value, 
00088                  const utility::VectorBase& weight) const; 
00089 
00090   private:
00091     friend class ROC;
00092 
00093     typedef std::multimap<double, std::pair<bool, double> > MultiMap;
00094     double score(const MultiMap&) const;
00095   };
00096 
00097 }}} // of namespace statistics, yat, and theplu
00098 
00099 #endif

Generated on Thu Dec 20 2012 03:12:58 for yat by  doxygen 1.8.0-20120409