SHOGUN
v2.0.0
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
src
shogun
multiclass
GMNPLib.h
Go to the documentation of this file.
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
inline
virtual
const
char
*
get_name
()
const
{
return
"GMNPLib"
; }
141
142
protected
:
144
float64_t
*
diag_H
;
146
float64_t
**
kernel_columns
;
148
float64_t
*
cache_index
;
150
int32_t
first_kernel_inx
;
152
int64_t
Cache_Size
;
154
int32_t
m_num_data
;
156
float64_t
m_reg_const
;
158
float64_t
*
m_vector_y
;
160
CKernel
*
m_kernel
;
161
163
int32_t
first_virt_inx
;
165
float64_t
*
virt_columns
[3];
167
int32_t
m_num_virt_data
;
169
int32_t
m_num_classes
;
170
};
171
}
172
#endif //GMNPLIB_H__
SHOGUN
Machine Learning Toolbox - Documentation