SHOGUN  3.2.1
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
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/config.h>
18 
19 #include <shogun/lib/common.h>
21 #include <shogun/lib/external/shogun_libsvm.h>
23 
24 namespace shogun
25 {
65 #ifndef DOXYGEN_SHOULD_SKIP_THIS
66 enum LIBSVR_SOLVER_TYPE
67 {
68  LIBSVR_EPSILON_SVR = 1,
69  LIBSVR_NU_SVR = 2
70 };
71 #endif
72 class CLibSVR : public CSVM
73 {
74  public:
77 
79  CLibSVR();
80 
89  CLibSVR(float64_t C, float64_t svr_param, CKernel* k, CLabels* lab,
90  LIBSVR_SOLVER_TYPE st=LIBSVR_EPSILON_SVR);
91 
92  virtual ~CLibSVR();
93 
99 
101  virtual const char* get_name() const { return "LibSVR"; }
102 
103  protected:
112  virtual bool train_machine(CFeatures* data=NULL);
113  protected:
115  svm_problem problem;
117  svm_parameter param;
118 
120  struct svm_model* model;
121 
123  LIBSVR_SOLVER_TYPE solver_type;
124 };
125 }
126 #endif
EMachineType
Definition: Machine.h:33
virtual bool train_machine(CFeatures *data=NULL)
Definition: LibSVR.cpp:61
The class Labels models labels, i.e. class assignments of objects.
Definition: Labels.h:43
virtual ~CLibSVR()
Definition: LibSVR.cpp:51
MACHINE_PROBLEM_TYPE(PT_REGRESSION)
virtual EMachineType get_classifier_type()
Definition: LibSVR.cpp:56
svm_problem problem
Definition: LibSVR.h:115
double float64_t
Definition: common.h:50
struct svm_model * model
Definition: LibSVR.h:120
Class LibSVR, performs support vector regression using LibSVM.
Definition: LibSVR.h:72
svm_parameter param
Definition: LibSVR.h:117
The class Features is the base class of all feature objects.
Definition: Features.h:68
LIBSVR_SOLVER_TYPE solver_type
Definition: LibSVR.h:123
virtual const char * get_name() const
Definition: LibSVR.h:101
A generic Support Vector Machine Interface.
Definition: SVM.h:49
The Kernel base class.
Definition: Kernel.h:153

SHOGUN 机器学习工具包 - 项目文档