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
ShareBoostOptimizer.h
Go to the documentation of this file.
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) 2012 Chiyuan Zhang
8
* Copyright (C) 2012 Chiyuan Zhang
9
*/
10
11
#ifndef SHAREBOOSTOPTIMIZER_H__
12
#define SHAREBOOSTOPTIMIZER_H__
13
14
#include <
shogun/multiclass/ShareBoost.h
>
15
16
namespace
shogun
17
{
18
20
class
ShareBoostOptimizer
21
{
22
public
:
24
ShareBoostOptimizer
(
CShareBoost
*sb,
bool
verbose=
false
)
25
:m_sb(sb), m_verbose(verbose) {
SG_REF
(m_sb); }
27
~ShareBoostOptimizer
() {
SG_UNREF
(m_sb); }
28
30
void
optimize
();
31
private
:
33
static
float64_t
lbfgs_evaluate(
void
*userdata,
const
float64_t
*W,
float64_t
*grad,
const
int32_t n,
const
float64_t
step);
34
36
static
int
lbfgs_progress(
37
void
*instance,
38
const
float64_t
*x,
39
const
float64_t
*g,
40
const
float64_t
fx,
41
const
float64_t
xnorm,
42
const
float64_t
gnorm,
43
const
float64_t
step,
44
int
n,
45
int
k,
46
int
ls
47
);
48
49
CShareBoost
*m_sb;
50
bool
m_verbose;
51
};
52
53
}
/* shogun */
54
55
#endif
/* end of include guard: SHAREBOOSTOPTIMIZER_H__ */
56
SHOGUN
Machine Learning Toolbox - Documentation