SHOGUN  4.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
LibSVR.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  * 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 <shogun/lib/config.h>
16 
17 #include <shogun/lib/common.h>
19 #include <shogun/lib/external/shogun_libsvm.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:
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 
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
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:113
double float64_t
Definition: common.h:50
struct svm_model * model
Definition: LibSVR.h:118
Class LibSVR, performs support vector regression using LibSVM.
Definition: LibSVR.h:70
svm_parameter param
Definition: LibSVR.h:115
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
The class Features is the base class of all feature objects.
Definition: Features.h:68
LIBSVR_SOLVER_TYPE solver_type
Definition: LibSVR.h:121
virtual const char * get_name() const
Definition: LibSVR.h:99
A generic Support Vector Machine Interface.
Definition: SVM.h:49
The Kernel base class.
Definition: Kernel.h:159

SHOGUN Machine Learning Toolbox - Documentation