SHOGUN
3.2.1
首页
相关页面
模块
类
文件
文件列表
文件成员
全部
类
命名空间
文件
函数
变量
类型定义
枚举
枚举值
友元
宏定义
组
页
src
shogun
labels
MulticlassLabels.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
* Written (W) 1999-2009 Soeren Sonnenburg
8
* Written (W) 1999-2008 Gunnar Raetsch
9
* Written (W) 2011 Heiko Strathmann
10
* Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society
11
*/
12
13
#ifndef _MULTICLASS_LABELS__H__
14
#define _MULTICLASS_LABELS__H__
15
16
#include <
shogun/lib/common.h
>
17
#include <
shogun/io/File.h
>
18
#include <
shogun/labels/LabelTypes.h
>
19
#include <
shogun/labels/DenseLabels.h
>
20
#include <
shogun/features/SubsetStack.h
>
21
22
namespace
shogun
23
{
24
class
CFile;
25
class
CBinaryLabels;
26
class
CMulticlassLabels;
27
class
CDenseLabels;
28
33
class
CMulticlassLabels
:
public
CDenseLabels
34
{
35
public
:
37
CMulticlassLabels
();
38
43
CMulticlassLabels
(int32_t num_labels);
44
49
CMulticlassLabels
(
SGVector<float64_t>
src);
50
55
CMulticlassLabels
(
CFile
* loader);
56
58
~CMulticlassLabels
();
59
66
virtual
void
ensure_valid
(
const
char
* context=NULL);
67
72
virtual
ELabelType
get_label_type
()
const
;
73
79
CBinaryLabels
*
get_binary_for_class
(int32_t i);
80
87
SGVector<float64_t>
get_unique_labels
();
88
95
int32_t
get_num_classes
();
96
102
SGVector<float64_t>
get_multiclass_confidences
(int32_t i);
103
111
void
set_multiclass_confidences
(int32_t i,
SGVector<float64_t>
confidences);
112
119
void
allocate_confidences_for
(int32_t n_classes);
120
122
virtual
const
char
*
get_name
()
const
{
return
"MulticlassLabels"
; }
123
124
private
:
126
void
init();
127
128
protected
:
129
131
SGMatrix<float64_t>
m_multiclass_confidences
;
132
};
133
}
134
#endif
SHOGUN
机器学习工具包 - 项目文档