SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOSVMHelper.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) 2013 Shell Hu
8  * Copyright (C) 2013 Shell Hu
9  */
10 
11 #ifndef __SOSVM_HELPER_H__
12 #define __SOSVM_HELPER_H__
13 
14 #include <shogun/lib/config.h>
15 
16 #include <shogun/base/SGObject.h>
17 #include <shogun/lib/SGVector.h>
19 
20 namespace shogun
21 {
22 
31 class CSOSVMHelper : public CSGObject
32 {
33 public:
35  CSOSVMHelper();
36 
41  CSOSVMHelper(int32_t bufsize);
42 
44  virtual ~CSOSVMHelper();
45 
47  virtual const char* get_name() const { return "SOSVMHelper"; }
48 
58 
69 
77 
86  virtual void add_debug_info(float64_t primal, float64_t eff_pass, float64_t train_error,
87  float64_t dual = -1, float64_t dgap = -1);
88 
94 
100 
106 
112 
118 
121  void terminate();
122 
123 private:
125  void init();
126 
127 private:
129  SGVector<float64_t> m_primal;
130 
132  SGVector<float64_t> m_dual;
133 
135  SGVector<float64_t> m_duality_gap;
136 
138  SGVector<float64_t> m_eff_pass;
139 
141  SGVector<float64_t> m_train_error;
142 
144  int32_t m_tracker;
145 
147  int32_t m_bufsize;
148 
149 }; /* CSOSVMHelper */
150 
151 } /* namespace shogun */
152 
153 #endif

SHOGUN Machine Learning Toolbox - Documentation