SHOGUN  6.0.0
ScatterSVM.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) 2009 Soeren Sonnenburg
8  * Written (W) 2009 Marius Kloft
9  * Copyright (C) 2009 TU Berlin and Max-Planck-Society
10  */
11 
12 #ifndef _SCATTERSVM_H___
13 #define _SCATTERSVM_H___
14 
15 #include <shogun/lib/common.h>
16 #include <shogun/lib/config.h>
18 #include <shogun/lib/external/shogun_libsvm.h>
19 
20 
21 namespace shogun
22 {
25  {
28 
33  };
34 
50 {
51  public:
53  CScatterSVM();
54 
57 
64  CScatterSVM(float64_t C, CKernel* k, CLabels* lab);
65 
67  virtual ~CScatterSVM();
68 
74 
80  virtual float64_t apply_one(int32_t num);
81 
86  virtual CLabels* classify_one_vs_rest();
87 
89  virtual const char* get_name() const { return "ScatterSVM"; }
90 
91  protected:
100  virtual bool train_machine(CFeatures* data=NULL);
101 
102  private:
103  void compute_norm_wc();
104  virtual bool train_no_bias_libsvm();
105 
106  virtual bool train_testrule12();
107 
108  void register_params();
109 
110  protected:
113 
116  int32_t norm_wc_len;
117 
120  int32_t norm_wcw_len;
121 
124 
126  int32_t m_num_classes;
127 };
128 }
129 #endif // ScatterSVM
EMachineType
Definition: Machine.h:33
virtual bool train_machine(CFeatures *data=NULL)
Definition: ScatterSVM.cpp:56
float64_t * norm_wcw
Definition: ScatterSVM.h:119
virtual float64_t apply_one(int32_t num)
Definition: ScatterSVM.cpp:432
no bias w/ libsvm
Definition: ScatterSVM.h:27
The class Labels models labels, i.e. class assignments of objects.
Definition: Labels.h:43
float64_t * norm_wc
Definition: ScatterSVM.h:115
class MultiClassSVM
Definition: MulticlassSVM.h:28
virtual ~CScatterSVM()
Definition: ScatterSVM.cpp:41
double float64_t
Definition: common.h:60
SCATTER_TYPE scatter_type
Definition: ScatterSVM.h:112
virtual const char * get_name() const
Definition: ScatterSVM.h:89
ScatterSVM - Multiclass SVM.
Definition: ScatterSVM.h:49
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
SCATTER_TYPE
Definition: ScatterSVM.h:24
training with bias using test rule 2
Definition: ScatterSVM.h:32
The class Features is the base class of all feature objects.
Definition: Features.h:68
training with bias using test rule 1
Definition: ScatterSVM.h:30
virtual EMachineType get_classifier_type()
Definition: ScatterSVM.h:73
The Kernel base class.
virtual CLabels * classify_one_vs_rest()
Definition: ScatterSVM.cpp:363

SHOGUN Machine Learning Toolbox - Documentation