SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LaplacianInferenceMethod.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) 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_ */

SHOGUN Machine Learning Toolbox - Documentation