SHOGUN  4.1.0
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
FWSOSVM.h
浏览该文件的文档.
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) 2014 Shell Hu
8  * Copyright (C) 2014 Shell Hu
9  */
10 
11 #ifndef __FW_SOSVM_H__
12 #define __FW_SOSVM_H__
13 
14 #include <shogun/lib/config.h>
15 
17 
18 namespace shogun
19 {
20 
27 {
28 public:
30  CFWSOSVM();
31 
40  bool do_line_search = true, bool verbose = false);
41 
43  ~CFWSOSVM();
44 
46  virtual const char* get_name() const { return "FWSOSVM"; }
47 
53 
55  float64_t get_lambda() const;
56 
61  void set_lambda(float64_t lbda);
62 
64  int32_t get_num_iter() const;
65 
70  void set_num_iter(int32_t num_iter);
71 
74 
79  void set_gap_threshold(float64_t gap_threshold);
80 
82  float64_t get_ell() const;
83 
88  void set_ell(float64_t ell);
89 
90 protected:
96  virtual bool train_machine(CFeatures* data = NULL);
97 
98 private:
100  void init();
101 
102 private:
104  float64_t m_lambda;
105 
107  int32_t m_num_iter;
108 
110  bool m_do_line_search;
111 
113  float64_t m_gap_threshold;
114 
116  float64_t m_ell;
117 
118 }; /* CFWSOSVM */
119 
120 } /* namespace shogun */
121 
122 #endif
EMachineType
Definition: Machine.h:33
Base class of the labels used in Structured Output (SO) problems.
void set_ell(float64_t ell)
Definition: FWSOSVM.cpp:245
Class CFWSOSVM solves SOSVM using Frank-Wolfe algorithm [1].
Definition: FWSOSVM.h:26
float64_t get_lambda() const
Definition: FWSOSVM.cpp:210
int32_t get_num_iter() const
Definition: FWSOSVM.cpp:220
virtual bool train_machine(CFeatures *data=NULL)
Definition: FWSOSVM.cpp:67
void set_lambda(float64_t lbda)
Definition: FWSOSVM.cpp:215
float64_t get_gap_threshold() const
Definition: FWSOSVM.cpp:230
double float64_t
Definition: common.h:50
void set_gap_threshold(float64_t gap_threshold)
Definition: FWSOSVM.cpp:235
float64_t get_ell() const
Definition: FWSOSVM.cpp:240
Class CStructuredModel that represents the application specific model and contains most of the applic...
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
virtual const char * get_name() const
Definition: FWSOSVM.h:46
The class Features is the base class of all feature objects.
Definition: Features.h:68
void set_num_iter(int32_t num_iter)
Definition: FWSOSVM.cpp:225
virtual EMachineType get_classifier_type()
Definition: FWSOSVM.cpp:62

SHOGUN 机器学习工具包 - 项目文档