SHOGUN
v2.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
multiclass
MulticlassOneVsOneStrategy.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
* Written (W) 2012 Chiyuan Zhang
8
* Copyright (C) 2012 Chiyuan Zhang
9
*/
10
11
#include <
shogun/multiclass/MulticlassStrategy.h
>
12
13
namespace
shogun
14
{
15
22
class
CMulticlassOneVsOneStrategy
:
public
CMulticlassStrategy
23
{
24
public
:
26
CMulticlassOneVsOneStrategy
();
27
29
virtual
~CMulticlassOneVsOneStrategy
() {}
30
32
virtual
void
train_start
(
CMulticlassLabels
*orig_labels,
CBinaryLabels
*train_labels);
33
35
virtual
bool
train_has_more
();
36
40
virtual
SGVector<int32_t>
train_prepare_next
();
41
45
virtual
int32_t
decide_label
(
SGVector<float64_t>
outputs);
46
49
virtual
int32_t
get_num_machines
()
50
{
51
return
m_num_classes
*(
m_num_classes
-1)/2;
52
}
53
55
virtual
const
char
*
get_name
()
const
56
{
57
return
"MulticlassOneVsOneStrategy"
;
58
};
59
60
protected
:
61
int32_t
m_num_machines
;
62
int32_t
m_train_pair_idx_1
;
63
int32_t
m_train_pair_idx_2
;
64
};
65
66
}
// namespace shogun
SHOGUN
Machine Learning Toolbox - Documentation