SHOGUN  6.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
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/config.h>
15 
16 #include <shogun/lib/common.h>
18 #include <shogun/lib/external/shogun_libsvm.h>
19 
20 namespace shogun
21 {
22 #ifndef DOXYGEN_SHOULD_SKIP_THIS
23 enum LIBSVM_SOLVER_TYPE
24 {
25  LIBSVM_C_SVC = 1,
26  LIBSVM_NU_SVC = 2
27 };
28 #endif
29 
30 class CLibSVM : public CSVM
31 {
32  public:
34  CLibSVM();
35 
40  CLibSVM(LIBSVM_SOLVER_TYPE st);
41 
49  CLibSVM(float64_t C, CKernel* k, CLabels* lab,
50  LIBSVM_SOLVER_TYPE st=LIBSVM_C_SVC);
51 
52  virtual ~CLibSVM();
53 
59 
61  virtual const char* get_name() const { return "LibSVM"; }
62 
63  private:
64  void register_params();
65 
66  protected:
75  virtual bool train_machine(CFeatures* data=NULL);
76 
77  protected:
79  LIBSVM_SOLVER_TYPE solver_type;
80 };
81 }
82 #endif
EMachineType
Definition: Machine.h:33
LibSVM.
Definition: LibSVM.h:30
The class Labels models labels, i.e. class assignments of objects.
Definition: Labels.h:43
LIBSVM_SOLVER_TYPE solver_type
Definition: LibSVM.h:79
double float64_t
Definition: common.h:60
virtual bool train_machine(CFeatures *data=NULL)
Definition: LibSVM.cpp:45
virtual const char * get_name() const
Definition: LibSVM.h:61
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
A generic Support Vector Machine Interface.
Definition: SVM.h:49
The Kernel base class.
virtual ~CLibSVM()
Definition: LibSVM.cpp:36
virtual EMachineType get_classifier_type()
Definition: LibSVM.h:58

SHOGUN Machine Learning Toolbox - Documentation