SHOGUN
3.2.1
首页
相关页面
模块
类
文件
文件列表
文件成员
全部
类
命名空间
文件
函数
变量
类型定义
枚举
枚举值
友元
宏定义
组
页
src
shogun
machine
BaseMulticlassMachine.cpp
浏览该文件的文档.
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) 2012 Chiyuan Zhang
8
* Copyright (C) 2012 Chiyuan Zhang
9
*/
10
11
#include <
shogun/machine/BaseMulticlassMachine.h
>
12
13
using namespace
shogun;
14
15
CBaseMulticlassMachine::CBaseMulticlassMachine
()
16
{
17
m_machines
=
new
CDynamicObjectArray
();
18
19
SG_ADD
((
CSGObject
**)&
m_machines
,
"machines"
,
"Machines that jointly make up the multi-class machine."
,
MS_NOT_AVAILABLE
);
20
}
21
22
CBaseMulticlassMachine::~CBaseMulticlassMachine
()
23
{
24
SG_UNREF
(
m_machines
);
25
}
26
27
int32_t
CBaseMulticlassMachine::get_num_machines
()
const
28
{
29
return
m_machines
->
get_num_elements
();
30
}
31
32
EProblemType
CBaseMulticlassMachine::get_machine_problem_type
()
const
33
{
34
return
PT_MULTICLASS
;
35
}
36
37
bool
CBaseMulticlassMachine::is_label_valid
(
CLabels
*lab)
const
38
{
39
return
lab->
get_label_type
() ==
LT_MULTICLASS
;
40
}
41
SHOGUN
机器学习工具包 - 项目文档