SHOGUN
3.2.1
首页
相关页面
模块
类
文件
文件列表
文件成员
全部
类
命名空间
文件
函数
变量
类型定义
枚举
枚举值
友元
宏定义
组
页
src
shogun
transfer
multitask
MultitaskROCEvaluation.h
浏览该文件的文档.
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/transfer/multitask/TaskRelation.h
>
14
#include <
shogun/evaluation/ROCEvaluation.h
>
15
16
namespace
shogun
17
{
18
24
class
CMultitaskROCEvaluation
:
public
CROCEvaluation
25
{
26
public
:
28
CMultitaskROCEvaluation
() :
29
CROCEvaluation
(),
m_task_relation
(NULL),
m_tasks_indices
(NULL),
30
m_num_tasks
(0)
31
{
32
}
33
35
CMultitaskROCEvaluation
(
CTaskRelation
* task_relation) :
36
CROCEvaluation
(),
m_task_relation
(NULL),
m_tasks_indices
(NULL),
37
m_num_tasks
(0)
38
{
39
set_task_relation
(task_relation);
40
}
41
43
virtual
~CMultitaskROCEvaluation
()
44
{
45
SG_FREE(
m_tasks_indices
);
46
}
47
49
void
set_task_relation
(
CTaskRelation
* task_relation)
50
{
51
SG_REF
(task_relation);
52
SG_UNREF
(
m_task_relation
);
53
m_task_relation
= task_relation;
54
}
55
57
CTaskRelation
*
get_task_relation
()
const
58
{
59
SG_REF
(
m_task_relation
);
60
return
m_task_relation
;
61
}
62
68
virtual
void
set_indices
(
SGVector<index_t>
indices);
69
71
virtual
const
char
*
get_name
()
const
{
return
"MultitaskROCEvaluation"
; };
72
78
virtual
float64_t
evaluate
(
CLabels
* predicted,
CLabels
* ground_truth);
79
81
virtual
EEvaluationDirection
get_evaluation_direction
()
const
82
{
83
return
ED_MAXIMIZE
;
84
}
85
86
protected
:
87
89
CTaskRelation
*
m_task_relation
;
90
92
SGVector<index_t>
*
m_tasks_indices
;
93
95
int32_t
m_num_tasks
;
96
};
97
98
}
99
100
#endif
/* MULTITASKROCEVALUATION_H_ */
SHOGUN
机器学习工具包 - 项目文档