00001 #ifndef _theplu_yat_statistics_score_ 00002 #define _theplu_yat_statistics_score_ 00003 00004 // $Id: Score.h 1797 2009-02-12 18:07:10Z peter $ 00005 00006 /* 00007 Copyright (C) 2004, 2005 Peter Johansson 00008 Copyright (C) 2006 Jari Häkkinen, Peter Johansson, Markus Ringnér 00009 Copyright (C) 2007, 2008 Jari Häkkinen, 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 namespace theplu { 00028 namespace yat { 00029 namespace classifier { 00030 class Target; 00031 class DataLookup1D; 00032 class DataLookupWeighted1D; 00033 } 00034 namespace utility { 00035 class VectorBase; 00036 } 00037 namespace statistics { 00038 00042 class Score 00043 { 00044 00045 public: 00049 Score(bool) ; 00050 00054 virtual ~Score(void); 00055 00059 void absolute(bool absolute); 00060 00066 virtual double 00067 score(const classifier::Target& target, 00068 const utility::VectorBase& value) const = 0; 00069 00081 virtual double score(const classifier::Target& target, 00082 const classifier::DataLookup1D& value) const; 00083 00095 virtual double 00096 score(const classifier::Target& target, 00097 const classifier::DataLookupWeighted1D& value) const; 00098 00106 virtual double 00107 score(const classifier::Target& target, 00108 const utility::VectorBase& value, 00109 const utility::VectorBase& weight) const = 0; 00110 00123 double score(const classifier::Target& target, 00124 const classifier::DataLookup1D& value, 00125 const classifier::DataLookup1D& weight) const; 00126 00127 protected: 00130 bool absolute_; 00131 00132 }; // class Score 00133 00134 }}} // of namespace statistics, yat, and theplu 00135 00136 #endif