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
classifier
svm
LibSVM.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) 1999-2009 Soeren Sonnenburg
8
* Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society
9
*/
10
11
#ifndef _LIBSVM_H___
12
#define _LIBSVM_H___
13
14
#include <
shogun/lib/common.h
>
15
#include <
shogun/classifier/svm/SVM.h
>
16
#include <shogun/lib/external/shogun_libsvm.h>
17
18
namespace
shogun
19
{
20
#ifndef DOXYGEN_SHOULD_SKIP_THIS
21
enum
LIBSVM_SOLVER_TYPE
22
{
23
LIBSVM_C_SVC = 1,
24
LIBSVM_NU_SVC = 2
25
};
26
#endif
27
28
class
CLibSVM
:
public
CSVM
29
{
30
public
:
32
CLibSVM
();
33
38
CLibSVM
(LIBSVM_SOLVER_TYPE st);
39
47
CLibSVM
(
float64_t
C,
CKernel
* k,
CLabels
* lab,
48
LIBSVM_SOLVER_TYPE st=LIBSVM_C_SVC);
49
50
virtual
~CLibSVM
();
51
56
virtual
EMachineType
get_classifier_type
() {
return
CT_LIBSVM
; }
57
59
virtual
const
char
*
get_name
()
const
{
return
"LibSVM"
; }
60
61
protected
:
70
virtual
bool
train_machine
(
CFeatures
* data=NULL);
71
72
protected
:
74
svm_problem
problem
;
76
svm_parameter
param
;
78
struct
svm_model*
model
;
79
81
LIBSVM_SOLVER_TYPE
solver_type
;
82
};
83
}
84
#endif
SHOGUN
Machine Learning Toolbox - Documentation