SHOGUN
3.2.1
首页
相关页面
模块
类
文件
文件列表
文件成员
全部
类
命名空间
文件
函数
变量
类型定义
枚举
枚举值
友元
宏定义
组
页
src
shogun
structure
StochasticSOSVM.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) 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
机器学习工具包 - 项目文档