SHOGUN
3.2.1
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
structure
StochasticSOSVM.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) 2013 Shell Hu
8
* Copyright (C) 2013 Shell Hu
9
*/
10
11
#ifndef __STOCHASTIC_SOSVM_H__
12
#define __STOCHASTIC_SOSVM_H__
13
14
#include <
shogun/lib/SGVector.h
>
15
#include <
shogun/machine/LinearStructuredOutputMachine.h
>
16
17
namespace
shogun
18
{
19
31
class
CStochasticSOSVM
:
public
CLinearStructuredOutputMachine
32
{
33
public
:
35
CStochasticSOSVM
();
36
44
CStochasticSOSVM
(
CStructuredModel
* model,
CStructuredLabels
* labs,
45
bool
do_weighted_averaging =
true
,
bool
verbose =
false
);
46
48
~CStochasticSOSVM
();
49
51
virtual
const
char
*
get_name
()
const
{
return
"StochasticSOSVM"
; }
52
57
virtual
EMachineType
get_classifier_type
();
58
60
float64_t
get_lambda
()
const
;
61
66
void
set_lambda
(
float64_t
lbda);
67
69
int32_t
get_num_iter
()
const
;
70
75
void
set_num_iter
(int32_t num_iter);
76
78
int32_t
get_debug_multiplier
()
const
;
79
84
void
set_debug_multiplier
(int32_t multiplier);
85
87
uint32_t
get_rand_seed
()
const
;
88
93
void
set_rand_seed
(uint32_t rand_seed);
94
95
protected
:
101
virtual
bool
train_machine
(
CFeatures
* data = NULL);
102
103
private
:
105
void
init();
106
107
private
:
109
float64_t
m_lambda;
110
112
int32_t m_num_iter;
113
115
bool
m_do_weighted_averaging;
116
118
uint32_t m_rand_seed;
119
126
int32_t m_debug_multiplier;
127
128
};
/* CStochasticSOSVM */
129
130
}
/* namespace shogun */
131
132
#endif
SHOGUN
Machine Learning Toolbox - Documentation