SHOGUN  4.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules 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 
13 #include <shogun/lib/config.h>
14 
17 #include <shogun/labels/Labels.h>
18 
19 namespace shogun
20 {
21 
22 class CLabels;
23 
31 {
32 public:
35 
38 
40  virtual ~CMulticlassOVREvaluation();
41 
44  {
45  SG_REF(binary_evaluation);
47  m_binary_evaluation = binary_evaluation;
48  }
49 
52  {
54  return m_binary_evaluation;
55  }
56 
62  virtual float64_t evaluate(CLabels* predicted, CLabels* ground_truth);
63 
66  {
67  return m_last_results;
68  }
69 
72  {
74  ASSERT(class_idx>=0)
75  ASSERT(class_idx<m_num_graph_results)
76  return m_graph_results[class_idx];
77  }
78 
81  {
83  }
84 
86  virtual const char* get_name() const { return "MulticlassOVREvaluation"; }
87 
88 protected:
89 
92 
95 
98 
101 
102 };
103 
104 }
105 
106 #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:43
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:51
virtual float64_t evaluate(CLabels *predicted, CLabels *ground_truth)
#define ASSERT(x)
Definition: SGIO.h:201
EEvaluationDirection
Definition: Evaluation.h:29
double float64_t
Definition: common.h:50
CBinaryClassEvaluation * get_binary_evaluation()
#define SG_UNREF(x)
Definition: SGObject.h:52
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
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:40

SHOGUN Machine Learning Toolbox - Documentation