SHOGUN  v3.0.0
 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/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

SHOGUN Machine Learning Toolbox - Documentation