SHOGUN  3.2.1
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
ScatterSVM.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) 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 #include <stdio.h>
21 
22 namespace shogun
23 {
26  {
29 
34  };
35 
51 {
52  public:
54  CScatterSVM();
55 
58 
65  CScatterSVM(float64_t C, CKernel* k, CLabels* lab);
66 
68  virtual ~CScatterSVM();
69 
75 
81  virtual float64_t apply_one(int32_t num);
82 
87  virtual CLabels* classify_one_vs_rest();
88 
90  virtual const char* get_name() const { return "ScatterSVM"; }
91 
92  protected:
101  virtual bool train_machine(CFeatures* data=NULL);
102 
103  private:
104  void compute_norm_wc();
105  virtual bool train_no_bias_libsvm();
106 
107  virtual bool train_testrule12();
108 
109  protected:
112 
114  svm_problem problem;
116  svm_parameter param;
117 
119  struct svm_model* model;
120 
123 
126 
129 
131  int32_t m_num_classes;
132 };
133 }
134 #endif // ScatterSVM

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