SHOGUN  v3.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ExactInferenceMethod.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 
12 #ifndef CEXACTINFERENCEMETHOD_H_
13 #define CEXACTINFERENCEMETHOD_H_
14 
15 #include <shogun/lib/config.h>
16 
17 #ifdef HAVE_EIGEN3
18 
20 
21 namespace shogun
22 {
23 
48 {
49 public:
52 
61  CExactInferenceMethod(CKernel* kernel, CFeatures* features,
62  CMeanFunction* mean, CLabels* labels, CLikelihoodModel* model);
63 
64  virtual ~CExactInferenceMethod();
65 
70  virtual EInferenceType get_inference_type() const { return INF_EXACT; }
71 
76  virtual const char* get_name() const { return "ExactInferenceMethod"; }
77 
90 
101  virtual SGVector<float64_t> get_alpha();
102 
115 
128 
139 
150 
155  virtual bool supports_regression() const
156  {
157  check_members();
158  return m_model->supports_regression();
159  }
160 
162  virtual void update();
163 
164 protected:
166  virtual void check_members() const;
167 
169  virtual void update_alpha();
170 
172  virtual void update_chol();
173 
175  virtual void update_mean();
176 
178  virtual void update_cov();
179 
183  virtual void update_deriv();
184 
193  const TParameter* param);
194 
203  const TParameter* param);
204 
213  const TParameter* param);
214 
223  const TParameter* param);
224 
225 private:
227  SGMatrix<float64_t> m_Sigma;
228 
230  SGVector<float64_t> m_mu;
231 
233 };
234 }
235 #endif /* HAVE_EIGEN3 */
236 #endif /* CEXACTINFERENCEMETHOD_H_ */
The Gaussian exact form inference method class.
virtual bool supports_regression() const
The Inference Method base class.
virtual SGMatrix< float64_t > get_posterior_covariance()
The class Labels models labels, i.e. class assignments of objects.
Definition: Labels.h:35
virtual const char * get_name() const
virtual SGVector< float64_t > get_alpha()
parameter struct
Definition: Parameter.h:26
virtual EInferenceType get_inference_type() const
An abstract class of the mean function.
Definition: MeanFunction.h:26
virtual SGMatrix< float64_t > get_cholesky()
virtual SGVector< float64_t > get_derivative_wrt_mean(const TParameter *param)
double float64_t
Definition: common.h:48
virtual SGVector< float64_t > get_derivative_wrt_inference_method(const TParameter *param)
virtual bool supports_regression() const
virtual SGVector< float64_t > get_diagonal_vector()
virtual float64_t get_negative_log_marginal_likelihood()
The class Features is the base class of all feature objects.
Definition: Features.h:62
virtual SGVector< float64_t > get_derivative_wrt_kernel(const TParameter *param)
virtual SGVector< float64_t > get_derivative_wrt_likelihood_model(const TParameter *param)
The Kernel base class.
Definition: Kernel.h:150
The Likelihood model base class.
CLikelihoodModel * m_model
virtual SGVector< float64_t > get_posterior_mean()

SHOGUN Machine Learning Toolbox - Documentation