CGMNPLib Class Reference


Detailed Description

class GMNPLib Library of solvers for Generalized Minimal Norm Problem (GMNP).

Generalized Minimal Norm Problem to solve is

min 0.5*alpha'*H*alpha + c'*alpha

subject to sum(alpha) = 1, alpha(i) >= 0

H [dim x dim] is symmetric positive definite matrix. c [dim x 1] is an arbitrary vector.

The precision of the found solution is given by the parameters tmax, tolabs and tolrel which define the stopping conditions:

UB-LB <= tolabs -> exit_flag = 1 Abs. tolerance. UB-LB <= UB*tolrel -> exit_flag = 2 Relative tolerance. LB > th -> exit_flag = 3 Threshold on lower bound. t >= tmax -> exit_flag = 0 Number of iterations.

UB ... Upper bound on the optimal solution. LB ... Lower bound on the optimal solution. t ... Number of iterations. History ... Value of LB and UB wrt. number of iterations.

The following algorithms are implemented: ..............................................

For more info refer to V.Franc: Optimization Algorithms for Kernel Methods. Research report. CTU-CMP-2005-22. CTU FEL Prague. 2005. ftp://cmp.felk.cvut.cz/pub/cmp/articles/franc/Franc-PhD.pdf .

Definition at line 64 of file gmnplib.h.

Inheritance diagram for CGMNPLib:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CGMNPLib (float64_t *vector_y, CKernel *kernel, int32_t num_data, int32_t num_virtual_data, int32_t num_classes, float64_t reg_const)
virtual ~CGMNPLib ()
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)
void get_indices2 (int32_t *index, int32_t *c, int32_t i)

Protected Member Functions

float64_tget_kernel_col (int32_t a)
float64_tget_col (int32_t a, int32_t b)
float64_t kernel_fce (int32_t a, int32_t b)
virtual const char * get_name () const

Protected Attributes

float64_tdiag_H
float64_t ** kernel_columns
float64_tcache_index
int32_t first_kernel_inx
int64_t Cache_Size
int32_t m_num_data
float64_t m_reg_const
float64_tm_vector_y
CKernelm_kernel
int32_t first_virt_inx
float64_tvirt_columns [3]
int32_t m_num_virt_data
int32_t m_num_classes

Constructor & Destructor Documentation

CGMNPLib::CGMNPLib ( float64_t vector_y,
CKernel kernel,
int32_t  num_data,
int32_t  num_virtual_data,
int32_t  num_classes,
float64_t  reg_const 
)

constructor

Parameters:
vector_y vector y
kernel kernel
num_data number of data
num_virtual_data number of virtual data
num_classes number of classes
reg_const reg const

Definition at line 78 of file gmnplib.cpp.

CGMNPLib::~CGMNPLib (  )  [virtual]

Definition at line 121 of file gmnplib.cpp.


Member Function Documentation

float64_t * CGMNPLib::get_col ( int32_t  a,
int32_t  b 
) [protected]

get col

Parameters:
a a
b b
Returns:
col at a, b

Definition at line 190 of file gmnplib.cpp.

void CGMNPLib::get_indices2 ( int32_t *  index,
int32_t *  c,
int32_t  i 
)

get indices2

Parameters:
index index
c c
i i

Definition at line 172 of file gmnplib.cpp.

float64_t * CGMNPLib::get_kernel_col ( int32_t  a  )  [protected]

get kernel col

Parameters:
a a
Returns:
col at a

Definition at line 139 of file gmnplib.cpp.

virtual const char* CGMNPLib::get_name (  )  const [protected, virtual]
Returns:
object name

Implements CSGObject.

Definition at line 135 of file gmnplib.h.

int8_t CGMNPLib::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 
)

-------------------------------------------------------------- GMNP solver based on improved MDM algorithm 1.

Search strategy: u determined by common rule and v is optimized.

Usage: exitflag = gmnp_imdm( &get_col, diag_H, vector_c, dim, tmax, tolabs, tolrel, th, &alpha, &t, &History ); --------------------------------------------------------------

Definition at line 238 of file gmnplib.cpp.

float64_t CGMNPLib::kernel_fce ( int32_t  a,
int32_t  b 
) [protected]

kernel fce

Parameters:
a a
b b
Returns:
something floaty

Definition at line 450 of file gmnplib.cpp.


Member Data Documentation

cache index

Definition at line 143 of file gmnplib.h.

int64_t CGMNPLib::Cache_Size [protected]

cache size

Definition at line 147 of file gmnplib.h.

diag H

Definition at line 139 of file gmnplib.h.

int32_t CGMNPLib::first_kernel_inx [protected]

first kernel inx

Definition at line 145 of file gmnplib.h.

int32_t CGMNPLib::first_virt_inx [protected]

index of first used column

Definition at line 158 of file gmnplib.h.

kernel columns

Definition at line 141 of file gmnplib.h.

kernel

Definition at line 155 of file gmnplib.h.

int32_t CGMNPLib::m_num_classes [protected]

number of classes

Definition at line 164 of file gmnplib.h.

int32_t CGMNPLib::m_num_data [protected]

num data

Definition at line 149 of file gmnplib.h.

int32_t CGMNPLib::m_num_virt_data [protected]

number of virt data

Definition at line 162 of file gmnplib.h.

reg const

Definition at line 151 of file gmnplib.h.

vectory

Definition at line 153 of file gmnplib.h.

cache for three columns

Definition at line 160 of file gmnplib.h.


The documentation for this class was generated from the following files:

SHOGUN Machine Learning Toolbox - Documentation