SHOGUN  4.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
GaussianLikelihood.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 CGAUSSIANLIKELIHOOD_H_
13 #define CGAUSSIANLIKELIHOOD_H_
14 
15 #include <shogun/lib/config.h>
16 
17 #ifdef HAVE_EIGEN3
18 
20 
21 namespace shogun
22 {
23 
35 {
36 public:
39 
45 
46  virtual ~CGaussianLikelihood();
47 
52  virtual const char* get_name() const { return "GaussianLikelihood"; }
53 
58  float64_t get_sigma() { return m_sigma; }
59 
64  void set_sigma(float64_t sigma)
65  {
66  REQUIRE(sigma>0.0, "Standard deviation must be greater than zero\n")
67  m_sigma=sigma;
68  }
69 
76 
93  SGVector<float64_t> s2, const CLabels* lab=NULL) const;
94 
110  SGVector<float64_t> s2, const CLabels* lab=NULL) const;
111 
116  virtual ELikelihoodModelType get_model_type() const { return LT_GAUSSIAN; }
117 
130  SGVector<float64_t> func) const;
131 
143  const CLabels* lab, SGVector<float64_t> func, index_t i) const;
144 
155  SGVector<float64_t> func, const TParameter* param) const;
156 
168  SGVector<float64_t> func, const TParameter* param) const;
169 
181  SGVector<float64_t> func, const TParameter* param) const;
182 
200  SGVector<float64_t> s2, const CLabels* lab) const;
201 
217  SGVector<float64_t> s2, const CLabels* lab, index_t i) const;
218 
234  SGVector<float64_t> s2, const CLabels* lab, index_t i) const;
235 
240  virtual bool supports_regression() const { return true; }
241 
242 private:
244  void init();
245 
247  float64_t m_sigma;
248 };
249 }
250 #endif /* HAVE_EIGEN3 */
251 #endif /* CGAUSSIANLIKELIHOOD_H_ */
ELikelihoodModelType
Class that models Gaussian likelihood.
virtual SGVector< float64_t > get_log_probability_f(const CLabels *lab, SGVector< float64_t > func) const
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
#define REQUIRE(x,...)
Definition: SGIO.h:206
void set_sigma(float64_t sigma)
virtual float64_t get_second_moment(SGVector< float64_t > mu, SGVector< float64_t > s2, const CLabels *lab, index_t i) const
virtual ELikelihoodModelType get_model_type() const
virtual SGVector< float64_t > get_first_derivative(const CLabels *lab, SGVector< float64_t > func, const TParameter *param) const
virtual SGVector< float64_t > get_predictive_variances(SGVector< float64_t > mu, SGVector< float64_t > s2, const CLabels *lab=NULL) const
virtual SGVector< float64_t > get_predictive_means(SGVector< float64_t > mu, SGVector< float64_t > s2, const CLabels *lab=NULL) const
double float64_t
Definition: common.h:50
virtual const char * get_name() const
virtual float64_t get_first_moment(SGVector< float64_t > mu, SGVector< float64_t > s2, const CLabels *lab, index_t i) const
static CGaussianLikelihood * obtain_from_generic(CLikelihoodModel *lik)
virtual SGVector< float64_t > get_second_derivative(const CLabels *lab, SGVector< float64_t > func, const TParameter *param) const
virtual SGVector< float64_t > get_log_zeroth_moments(SGVector< float64_t > mu, SGVector< float64_t > s2, const CLabels *lab) const
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
virtual SGVector< float64_t > get_log_probability_derivative_f(const CLabels *lab, SGVector< float64_t > func, index_t i) const
virtual bool supports_regression() const
virtual SGVector< float64_t > get_third_derivative(const CLabels *lab, SGVector< float64_t > func, const TParameter *param) const
The Likelihood model base class.

SHOGUN Machine Learning Toolbox - Documentation