SHOGUN  v3.2.0
GMNPLib.h
浏览该文件的文档.
1 /*-----------------------------------------------------------------------
2  *
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation; either version 3 of the License, or
6  * (at your option) any later version.
7  *
8  * Library of solvers for Generalized Nearest Point Problem (GNPP).
9  *
10  * Written (W) 1999-2008 Vojtech Franc, xfrancv@cmp.felk.cvut.cz
11  * Copyright (C) 1999-2008 Center for Machine Perception, CTU FEL Prague
12  *
13  -------------------------------------------------------------------- */
14 
15 #ifndef GMNPLIB_H__
16 #define GMNPLIB_H__
17 
18 #include <math.h>
19 #include <limits.h>
20 
21 #include <shogun/base/SGObject.h>
22 #include <shogun/io/SGIO.h>
23 #include <shogun/lib/common.h>
24 #include <shogun/kernel/Kernel.h>
25 
26 namespace shogun
27 {
66 class CGMNPLib: public CSGObject
67 {
68  public:
70  CGMNPLib();
71 
81  CGMNPLib(
82  float64_t* vector_y, CKernel* kernel, int32_t num_data,
83  int32_t num_virtual_data, int32_t num_classes, float64_t reg_const);
84 
85  virtual ~CGMNPLib();
86 
96  int8_t gmnp_imdm(float64_t *vector_c,
97  int32_t dim,
98  int32_t tmax,
99  float64_t tolabs,
100  float64_t tolrel,
101  float64_t th,
102  float64_t *alpha,
103  int32_t *ptr_t,
104  float64_t **ptr_History,
105  int32_t verb);
106 
113  void get_indices2( int32_t *index, int32_t *c, int32_t i );
114 
115  protected:
121  float64_t *get_kernel_col( int32_t a );
122 
129  float64_t* get_col( int32_t a, int32_t b );
130 
137  float64_t kernel_fce( int32_t a, int32_t b );
138 
140  virtual const char* get_name() const { return "GMNPLib"; }
141 
142  protected:
152  int64_t Cache_Size;
154  int32_t m_num_data;
161 
163  int32_t first_virt_inx;
169  int32_t m_num_classes;
170 };
171 }
172 #endif //GMNPLIB_H__
int32_t first_kernel_inx
Definition: GMNPLib.h:150
float64_t * virt_columns[3]
Definition: GMNPLib.h:165
int32_t first_virt_inx
Definition: GMNPLib.h:163
class GMNPLib Library of solvers for Generalized Minimal Norm Problem (GMNP).
Definition: GMNPLib.h:66
float64_t * m_vector_y
Definition: GMNPLib.h:158
float64_t m_reg_const
Definition: GMNPLib.h:156
CKernel * m_kernel
Definition: GMNPLib.h:160
float64_t ** kernel_columns
Definition: GMNPLib.h:146
float64_t * get_col(int32_t a, int32_t b)
Definition: GMNPLib.cpp:212
int32_t m_num_classes
Definition: GMNPLib.h:169
float64_t * cache_index
Definition: GMNPLib.h:148
float64_t * diag_H
Definition: GMNPLib.h:144
virtual ~CGMNPLib()
Definition: GMNPLib.cpp:143
void get_indices2(int32_t *index, int32_t *c, int32_t i)
Definition: GMNPLib.cpp:194
int32_t m_num_data
Definition: GMNPLib.h:154
float64_t kernel_fce(int32_t a, int32_t b)
Definition: GMNPLib.cpp:477
Class SGObject is the base class of all shogun objects.
Definition: SGObject.h:102
double float64_t
Definition: common.h:48
int8_t gmnp_imdm(float64_t *vector_c, int32_t dim, int32_t tmax, float64_t tolabs, float64_t tolrel, float64_t th, float64_t *alpha, int32_t *ptr_t, float64_t **ptr_History, int32_t verb)
Definition: GMNPLib.cpp:260
int32_t m_num_virt_data
Definition: GMNPLib.h:167
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:16
The Kernel base class.
Definition: Kernel.h:150
float64_t * get_kernel_col(int32_t a)
Definition: GMNPLib.cpp:161
int64_t Cache_Size
Definition: GMNPLib.h:152
virtual const char * get_name() const
Definition: GMNPLib.h:140

SHOGUN Machine Learning Toolbox - Documentation