SHOGUN  v3.0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MulticlassOVREvaluation.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 3 of the License, or
5  * (at your option) any later version.
6  *
7  * Copyright (C) 2012 Sergey Lisitsyn
8  */
9 
10 #ifndef MULTICLASSOVREVALUATION_H_
11 #define MULTICLASSOVREVALUATION_H_
12 
15 #include <shogun/labels/Labels.h>
16 
17 namespace shogun
18 {
19 
20 class CLabels;
21 
29 {
30 public:
33 
36 
38  virtual ~CMulticlassOVREvaluation();
39 
42  {
43  SG_REF(binary_evaluation);
45  m_binary_evaluation = binary_evaluation;
46  }
47 
50  {
52  return m_binary_evaluation;
53  }
54 
60  virtual float64_t evaluate(CLabels* predicted, CLabels* ground_truth);
61 
64  {
65  return m_last_results;
66  }
67 
70  {
72  ASSERT(class_idx>=0)
73  ASSERT(class_idx<m_num_graph_results)
74  return m_graph_results[class_idx];
75  }
76 
79  {
81  }
82 
84  virtual const char* get_name() const { return "MulticlassOVREvaluation"; }
85 
86 protected:
87 
90 
93 
96 
99 
100 };
101 
102 }
103 
104 #endif /* MULTICLASSOVREVALUATION_H_ */
The class MulticlassOVREvaluation used to compute evaluation parameters of multiclass classification ...
SGVector< float64_t > get_last_results()
CBinaryClassEvaluation * m_binary_evaluation
The class Labels models labels, i.e. class assignments of objects.
Definition: Labels.h:35
void set_binary_evaluation(CBinaryClassEvaluation *binary_evaluation)
virtual EEvaluationDirection get_evaluation_direction() const =0
virtual const char * get_name() const
#define SG_REF(x)
Definition: SGObject.h:53
virtual float64_t evaluate(CLabels *predicted, CLabels *ground_truth)
#define ASSERT(x)
Definition: SGIO.h:203
EEvaluationDirection
Definition: Evaluation.h:24
double float64_t
Definition: common.h:48
CBinaryClassEvaluation * get_binary_evaluation()
#define SG_UNREF(x)
Definition: SGObject.h:54
virtual EEvaluationDirection get_evaluation_direction() const
The class TwoClassEvaluation, a base class used to evaluate binary classification labels...
SGMatrix< float64_t > get_graph_for_class(int32_t class_idx)
Class Evaluation, a base class for other classes used to evaluate labels, e.g. accuracy of classifica...
Definition: Evaluation.h:35

SHOGUN Machine Learning Toolbox - Documentation