SHOGUN
3.2.1
首页
相关页面
模块
类
文件
文件列表
文件成员
全部
类
命名空间
文件
函数
变量
类型定义
枚举
枚举值
友元
宏定义
组
页
src
shogun
regression
svr
LibSVR.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) 1999-2009 Soeren Sonnenburg
8
* Written (W) 2013 Heiko Strathmann
9
* Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society
10
*/
11
12
#ifndef _LIBSVR_H___
13
#define _LIBSVR_H___
14
15
#include <stdio.h>
16
17
#include <
shogun/lib/common.h
>
18
#include <
shogun/classifier/svm/SVM.h
>
19
#include <shogun/lib/external/shogun_libsvm.h>
20
#include <
shogun/regression/Regression.h
>
21
22
namespace
shogun
23
{
63
#ifndef DOXYGEN_SHOULD_SKIP_THIS
64
enum
LIBSVR_SOLVER_TYPE
65
{
66
LIBSVR_EPSILON_SVR = 1,
67
LIBSVR_NU_SVR = 2
68
};
69
#endif
70
class
CLibSVR
:
public
CSVM
71
{
72
public
:
74
MACHINE_PROBLEM_TYPE
(
PT_REGRESSION
);
75
77
CLibSVR
();
78
87
CLibSVR
(
float64_t
C,
float64_t
svr_param,
CKernel
* k,
CLabels
* lab,
88
LIBSVR_SOLVER_TYPE st=LIBSVR_EPSILON_SVR);
89
90
virtual
~CLibSVR
();
91
96
virtual
EMachineType
get_classifier_type
();
97
99
virtual
const
char
*
get_name
()
const
{
return
"LibSVR"
; }
100
101
protected
:
110
virtual
bool
train_machine
(
CFeatures
* data=NULL);
111
protected
:
113
svm_problem
problem
;
115
svm_parameter
param
;
116
118
struct
svm_model*
model
;
119
121
LIBSVR_SOLVER_TYPE
solver_type
;
122
};
123
}
124
#endif
SHOGUN
机器学习工具包 - 项目文档