SHOGUN  3.2.1
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
LaplacianInferenceMethod.h
浏览该文件的文档.
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) 2013 Roman Votyakov
8  * Copyright (C) 2012 Jacob Walker
9  * Copyright (C) 2013 Roman Votyakov
10  *
11  * Code adapted from Gaussian Process Machine Learning Toolbox
12  * http://www.gaussianprocess.org/gpml/code/matlab/doc/
13  */
14 
15 #ifndef CLAPLACIANINFERENCEMETHOD_H_
16 #define CLAPLACIANINFERENCEMETHOD_H_
17 
18 #include <shogun/lib/config.h>
19 
20 #ifdef HAVE_EIGEN3
21 
23 
24 namespace shogun
25 {
26 
43 {
44 public:
47 
56  CLaplacianInferenceMethod(CKernel* kernel, CFeatures* features,
57  CMeanFunction* mean, CLabels* labels, CLikelihoodModel* model);
58 
60 
65  virtual EInferenceType get_inference_type() const { return INF_LAPLACIAN; }
66 
71  virtual const char* get_name() const { return "LaplacianInferenceMethod"; }
72 
85 
97 
110 
123 
137 
157 
162  virtual float64_t get_newton_tolerance() { return m_tolerance; }
163 
168  virtual void set_newton_tolerance(float64_t tol) { m_tolerance=tol; }
169 
174  virtual int32_t get_newton_iterations() { return m_iter; }
175 
180  virtual void set_newton_iterations(int32_t iter) { m_iter=iter; }
181 
186  virtual float64_t get_minimization_tolerance() { return m_opt_tolerance; }
187 
192  virtual void set_minimization_tolerance(float64_t tol) { m_opt_tolerance=tol; }
193 
198  virtual float64_t get_minimization_max() { return m_opt_max; }
199 
204  virtual void set_minimization_max(float64_t max) { m_opt_max=max; }
205 
210  virtual bool supports_regression() const
211  {
212  check_members();
213  return m_model->supports_regression();
214  }
215 
220  virtual bool supports_binary() const
221  {
222  check_members();
223  return m_model->supports_binary();
224  }
225 
227  virtual void update();
228 
229 protected:
231  virtual void update_alpha();
232 
234  virtual void update_chol();
235 
237  virtual void update_approx_cov();
238 
242  virtual void update_deriv();
243 
252  const TParameter* param);
253 
262  const TParameter* param);
263 
272  const TParameter* param);
273 
282  const TParameter* param);
283 
284 private:
285  void init();
287  float64_t m_tolerance;
288 
290  index_t m_iter;
291 
293  float64_t m_opt_tolerance;
294 
296  float64_t m_opt_max;
297 
298 protected:
301 
304 
307 
310 
313 
316 
319 
321 
323 
325 };
326 }
327 #endif /* HAVE_EIGEN3 */
328 #endif /* CLAPLACIANINFERENCEMETHOD_H_ */
virtual const char * get_name() const
The Inference Method base class.
int32_t index_t
Definition: common.h:62
The class Labels models labels, i.e. class assignments of objects.
Definition: Labels.h:43
parameter struct
Definition: Parameter.h:32
virtual SGVector< float64_t > get_derivative_wrt_mean(const TParameter *param)
virtual SGVector< float64_t > get_posterior_mean()
An abstract class of the mean function.
Definition: MeanFunction.h:28
virtual SGVector< float64_t > get_derivative_wrt_kernel(const TParameter *param)
virtual void set_minimization_max(float64_t max)
virtual void set_minimization_tolerance(float64_t tol)
virtual SGMatrix< float64_t > get_posterior_covariance()
virtual SGVector< float64_t > get_diagonal_vector()
virtual SGVector< float64_t > get_derivative_wrt_inference_method(const TParameter *param)
double float64_t
Definition: common.h:50
virtual bool supports_regression() const
virtual bool supports_binary() const
virtual SGVector< float64_t > get_alpha()
virtual void set_newton_iterations(int32_t iter)
virtual void set_newton_tolerance(float64_t tol)
The Laplace approximation inference method class.
The class Features is the base class of all feature objects.
Definition: Features.h:68
virtual void check_members() const
virtual EInferenceType get_inference_type() const
The Kernel base class.
Definition: Kernel.h:153
virtual SGVector< float64_t > get_derivative_wrt_likelihood_model(const TParameter *param)
The Likelihood model base class.
CLikelihoodModel * m_model
virtual SGMatrix< float64_t > get_cholesky()

SHOGUN 机器学习工具包 - 项目文档