SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 <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

SHOGUN Machine Learning Toolbox - Documentation