SHOGUN
v3.0.0
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
src
shogun
machine
BaseMulticlassMachine.cpp
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
* 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
Machine Learning Toolbox - Documentation