SHOGUN  4.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
MultitaskROCEvaluation.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 MULTITASKROCEVALUATION_H_
11 #define MULTITASKROCEVALUATION_H_
12 
13 #include <shogun/lib/config.h>
14 
17 
18 namespace shogun
19 {
20 
27 {
28 public:
32  m_num_tasks(0)
33  {
34  }
35 
39  m_num_tasks(0)
40  {
41  set_task_relation(task_relation);
42  }
43 
46  {
47  SG_FREE(m_tasks_indices);
48  }
49 
51  void set_task_relation(CTaskRelation* task_relation)
52  {
53  SG_REF(task_relation);
55  m_task_relation = task_relation;
56  }
57 
60  {
62  return m_task_relation;
63  }
64 
70  virtual void set_indices(SGVector<index_t> indices);
71 
73  virtual const char* get_name() const { return "MultitaskROCEvaluation"; };
74 
80  virtual float64_t evaluate(CLabels* predicted, CLabels* ground_truth);
81 
84  {
85  return ED_MAXIMIZE;
86  }
87 
88 protected:
89 
92 
95 
97  int32_t m_num_tasks;
98 };
99 
100 }
101 
102 #endif /* MULTITASKROCEVALUATION_H_ */
CMultitaskROCEvaluation(CTaskRelation *task_relation)
The class Labels models labels, i.e. class assignments of objects.
Definition: Labels.h:43
#define SG_REF(x)
Definition: SGObject.h:51
Class ROCEvalution used to evaluate ROC (Receiver Operating Characteristic) and an area under ROC cur...
Definition: ROCEvaluation.h:32
Class MultitaskROCEvalution used to evaluate ROC (Receiver Operating Characteristic) and an area unde...
EEvaluationDirection
Definition: Evaluation.h:29
CTaskRelation * get_task_relation() const
double float64_t
Definition: common.h:50
virtual float64_t evaluate(CLabels *predicted, CLabels *ground_truth)
#define SG_UNREF(x)
Definition: SGObject.h:52
virtual EEvaluationDirection get_evaluation_direction() const
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
void set_task_relation(CTaskRelation *task_relation)
used to represent tasks in multitask learning
Definition: TaskRelation.h:31
virtual void set_indices(SGVector< index_t > indices)
virtual const char * get_name() const

SHOGUN Machine Learning Toolbox - Documentation