SHOGUN  4.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules 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 
84 
97 
108  virtual SGVector<float64_t> get_alpha();
109 
122 
135 
146 
157 
162  virtual bool supports_regression() const
163  {
164  check_members();
165  return m_model->supports_regression();
166  }
167 
169  virtual void update();
170 
171 
172 protected:
174  virtual void check_members() const;
175 
177  virtual void update_alpha();
178 
180  virtual void update_chol();
181 
183  virtual void update_mean();
184 
186  virtual void update_cov();
187 
191  virtual void update_deriv();
192 
201  const TParameter* param);
202 
211  const TParameter* param);
212 
221  const TParameter* param);
222 
231  const TParameter* param);
232 
234  virtual void compute_gradient();
235 private:
237  SGMatrix<float64_t> m_Sigma;
238 
240  SGVector<float64_t> m_mu;
241 
243 };
244 }
245 #endif /* HAVE_EIGEN3 */
246 #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:43
virtual const char * get_name() const
virtual SGVector< float64_t > get_alpha()
parameter struct
virtual EInferenceType get_inference_type() const
static CExactInferenceMethod * obtain_from_generic(CInferenceMethod *inference)
An abstract class of the mean function.
Definition: MeanFunction.h:28
virtual SGMatrix< float64_t > get_cholesky()
virtual SGVector< float64_t > get_derivative_wrt_mean(const TParameter *param)
double float64_t
Definition: common.h:50
virtual SGVector< float64_t > get_derivative_wrt_inference_method(const TParameter *param)
virtual bool supports_regression() const
virtual SGVector< float64_t > get_diagonal_vector()
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
virtual float64_t get_negative_log_marginal_likelihood()
The class Features is the base class of all feature objects.
Definition: Features.h:68
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:158
The Likelihood model base class.
CLikelihoodModel * m_model
virtual SGVector< float64_t > get_posterior_mean()

SHOGUN Machine Learning Toolbox - Documentation