/usr/include/shogun/multiclass/ShareBoostOptimizer.h is in libshogun-dev 3.2.0-7.3build4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | /*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* Written (W) 2012 Chiyuan Zhang
* Copyright (C) 2012 Chiyuan Zhang
*/
#ifndef SHAREBOOSTOPTIMIZER_H__
#define SHAREBOOSTOPTIMIZER_H__
#include <shogun/multiclass/ShareBoost.h>
namespace shogun
{
/** Utility for ShareBoost to handle optimization */
class ShareBoostOptimizer
{
public:
/** constructor */
ShareBoostOptimizer(CShareBoost *sb, bool verbose=false)
:m_sb(sb), m_verbose(verbose) { SG_REF(m_sb); }
/** destructor */
~ShareBoostOptimizer() { SG_UNREF(m_sb); }
/** run optimization to compute the coefficients */
void optimize();
private:
/** the callback for l-bfgs */
static float64_t lbfgs_evaluate(void *userdata, const float64_t *W, float64_t *grad, const int32_t n, const float64_t step);
/** the callback for logging */
static int lbfgs_progress(
void *instance,
const float64_t *x,
const float64_t *g,
const float64_t fx,
const float64_t xnorm,
const float64_t gnorm,
const float64_t step,
int n,
int k,
int ls
);
CShareBoost *m_sb;
bool m_verbose;
};
} /* shogun */
#endif /* end of include guard: SHAREBOOSTOPTIMIZER_H__ */
|