SHOGUN  4.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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/lib/config.h>
15 
17 
18 namespace shogun
19 {
20 
23 {
24 public:
26  ShareBoostOptimizer(CShareBoost *sb, bool verbose=false)
27  :m_sb(sb), m_verbose(verbose) { SG_REF(m_sb); }
30 
32  void optimize();
33 private:
35  static float64_t lbfgs_evaluate(void *userdata, const float64_t *W, float64_t *grad, const int32_t n, const float64_t step);
36 
38  static int lbfgs_progress(
39  void *instance,
40  const float64_t *x,
41  const float64_t *g,
42  const float64_t fx,
43  const float64_t xnorm,
44  const float64_t gnorm,
45  const float64_t step,
46  int n,
47  int k,
48  int ls
49  );
50 
51  CShareBoost *m_sb;
52  bool m_verbose;
53 };
54 
55 } /* shogun */
56 
57 #endif /* end of include guard: SHAREBOOSTOPTIMIZER_H__ */
58 
#define SG_REF(x)
Definition: SGObject.h:54
double float64_t
Definition: common.h:50
#define SG_UNREF(x)
Definition: SGObject.h:55
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
ShareBoostOptimizer(CShareBoost *sb, bool verbose=false)

SHOGUN Machine Learning Toolbox - Documentation