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

SHOGUN Machine Learning Toolbox - Documentation