yat  0.20.3pre
Score.h
1 #ifndef _theplu_yat_statistics_score_
2 #define _theplu_yat_statistics_score_
3 
4 // $Id: Score.h 4207 2022-08-26 04:36:28Z peter $
5 
6 /*
7  Copyright (C) 2004, 2005 Peter Johansson
8  Copyright (C) 2006 Jari Häkkinen, Peter Johansson, Markus Ringnér
9  Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson
10  Copyright (C) 2022 Peter Johansson
11 
12  This file is part of the yat library, http://dev.thep.lu.se/yat
13 
14  The yat library is free software; you can redistribute it and/or
15  modify it under the terms of the GNU General Public License as
16  published by the Free Software Foundation; either version 3 of the
17  License, or (at your option) any later version.
18 
19  The yat library is distributed in the hope that it will be useful,
20  but WITHOUT ANY WARRANTY; without even the implied warranty of
21  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22  General Public License for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with yat. If not, see <http://www.gnu.org/licenses/>.
26 */
27 
28 namespace theplu {
29 namespace yat {
30 namespace classifier {
31  class Target;
32  class DataLookup1D;
33  class DataLookupWeighted1D;
34 }
35 namespace utility {
36  class VectorBase;
37 }
38 namespace statistics {
39 
43  class Score
44  {
45 
46  public:
50  Score(bool) ;
51 
55  virtual ~Score(void);
56 
60  void absolute(bool absolute);
61 
67  virtual double
68  score(const classifier::Target& target,
69  const utility::VectorBase& value) const = 0;
70 
82  virtual double score(const classifier::Target& target,
83  const classifier::DataLookup1D& value) const;
84 
96  virtual double
97  score(const classifier::Target& target,
98  const classifier::DataLookupWeighted1D& value) const;
99 
107  virtual double
108  score(const classifier::Target& target,
109  const utility::VectorBase& value,
110  const utility::VectorBase& weight) const = 0;
111 
124  double score(const classifier::Target& target,
125  const classifier::DataLookup1D& value,
126  const classifier::DataLookup1D& weight) const;
127 
128  protected:
131  bool absolute_;
132 
133  }; // class Score
134 
135 }}} // of namespace statistics, yat, and theplu
136 
137 #endif
Class for containing sample labels.
Definition: Target.h:47
The Department of Theoretical Physics namespace as we define it.
bool absolute_
Definition: Score.h:131
Class for general vector view.
Definition: DataLookup1D.h:43
virtual double score(const classifier::Target &target, const utility::VectorBase &value) const =0
This is the yat interface to GSL vector.
Definition: VectorBase.h:55
virtual ~Score(void)
Destructor.
Interface Class for score classes.
Definition: Score.h:43
void absolute(bool absolute)
Function changing mode of Score.
Class for general weighted vector view.
Definition: DataLookupWeighted1D.h:43

Generated on Sat Feb 18 2023 03:31:44 for yat by  doxygen 1.8.14