SHOGUN  v3.2.0
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
KernelMulticlassMachine.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) 1999-2012 Soeren Sonnenburg and Sergey Lisitsyn
8  * Written (W) 2012 Heiko Strathmann
9  * Copyright (C) 1999-2012 Fraunhofer Institute FIRST and Max-Planck-Society
10  */
11 
12 #ifndef _KERNELMULTICLASSMACHINE_H___
13 #define _KERNELMULTICLASSMACHINE_H___
14 
15 #include <shogun/lib/common.h>
17 #include <shogun/kernel/Kernel.h>
20 
21 namespace shogun
22 {
23 
24 class CKernel;
25 class CKernelMachine;
26 
29 {
30  public:
33 
40  CKernelMulticlassMachine(CMulticlassStrategy *strategy, CKernel* kernel, CKernelMachine* machine, CLabels* labs);
41 
43  virtual ~CKernelMulticlassMachine();
44 
46  virtual const char* get_name() const
47  {
48  return "KernelMulticlassMachine";
49  }
50 
55  void set_kernel(CKernel* k);
56 
62 
69  virtual void store_model_features();
70 
71  protected:
72 
74  virtual bool init_machine_for_train(CFeatures* data);
75 
77  virtual bool init_machines_for_apply(CFeatures* data);
78 
80  virtual bool is_ready();
81 
83  virtual CMachine* get_machine_from_trained(CMachine* machine);
84 
86  virtual int32_t get_num_rhs_vectors();
87 
92  virtual void add_machine_subset(SGVector<index_t> subset);
93 
95  virtual void remove_machine_subset();
96 
97  protected:
98 
101 
102 };
103 }
104 #endif
virtual void add_machine_subset(SGVector< index_t > subset)
The class Labels models labels, i.e. class assignments of objects.
Definition: Labels.h:35
A generic KernelMachine interface.
Definition: KernelMachine.h:50
A generic learning machine interface.
Definition: Machine.h:138
experimental abstract generic multiclass machine class
virtual CMachine * get_machine_from_trained(CMachine *machine)
virtual const char * get_name() const
virtual bool init_machine_for_train(CFeatures *data)
The class Features is the base class of all feature objects.
Definition: Features.h:62
virtual bool init_machines_for_apply(CFeatures *data)
The Kernel base class.
Definition: Kernel.h:150
class MulticlassStrategy used to construct generic multiclass classifiers with ensembles of binary cl...

SHOGUN Machine Learning Toolbox - Documentation