SHOGUN  v3.2.0
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
LikelihoodModel.h
浏览该文件的文档.
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  * Written (W) 2013 Heiko Strathmann
9  * Copyright (C) 2012 Jacob Walker
10  * Copyright (C) 2013 Roman Votyakov
11  */
12 
13 #ifndef CLIKELIHOODMODEL_H_
14 #define CLIKELIHOODMODEL_H_
15 
16 #include <shogun/base/SGObject.h>
17 #include <shogun/labels/Labels.h>
18 
19 namespace shogun
20 {
21 
24 {
30 };
31 
38 {
39 public:
42 
43  virtual ~CLikelihoodModel();
44 
74  const CLabels* lab=NULL);
75 
91  SGVector<float64_t> s2, const CLabels* lab=NULL) const=0;
92 
108  SGVector<float64_t> s2, const CLabels* lab=NULL) const=0;
109 
114  virtual ELikelihoodModelType get_model_type() const { return LT_NONE; }
115 
128  SGVector<float64_t> func) const=0;
129 
143  SGMatrix<float64_t> F) const;
144 
156  const CLabels* lab, SGVector<float64_t> func, index_t i) const=0;
157 
168  SGVector<float64_t> func, const TParameter* param) const
169  {
170  SG_ERROR("Can't compute derivative wrt %s parameter\n", param->m_name)
171  return SGVector<float64_t>();
172  }
173 
174 
186  SGVector<float64_t> func, const TParameter* param) const
187  {
188  SG_ERROR("Can't compute derivative wrt %s parameter\n", param->m_name)
189  return SGVector<float64_t>();
190  }
191 
203  SGVector<float64_t> func, const TParameter* param) const
204  {
205  SG_ERROR("Can't compute derivative wrt %s parameter\n", param->m_name)
206  return SGVector<float64_t>();
207  }
208 
226  SGVector<float64_t> s2, const CLabels* lab) const=0;
227 
243  SGVector<float64_t> s2, const CLabels* lab, index_t i) const=0;
244 
259  SGVector<float64_t> s2, const CLabels* lab) const;
260 
276  SGVector<float64_t> s2, const CLabels* lab, index_t i) const=0;
277 
292  SGVector<float64_t> s2, const CLabels* lab) const;
293 
298  virtual bool supports_regression() const { return false; }
299 
304  virtual bool supports_binary() const { return false; }
305 
310  virtual bool supports_multiclass() const { return false; }
311 };
312 }
313 #endif /* CLIKELIHOODMODEL_H_ */
virtual SGVector< float64_t > get_first_moments(SGVector< float64_t > mu, SGVector< float64_t > s2, const CLabels *lab) const
virtual SGVector< float64_t > get_log_probability_f(const CLabels *lab, SGVector< float64_t > func) const =0
ELikelihoodModelType
virtual bool supports_multiclass() const
int32_t index_t
Definition: common.h:60
The class Labels models labels, i.e. class assignments of objects.
Definition: Labels.h:35
virtual SGVector< float64_t > get_second_derivative(const CLabels *lab, SGVector< float64_t > func, const TParameter *param) const
virtual ELikelihoodModelType get_model_type() const
parameter struct
Definition: Parameter.h:26
#define SG_ERROR(...)
Definition: SGIO.h:131
virtual SGVector< float64_t > get_log_zeroth_moments(SGVector< float64_t > mu, SGVector< float64_t > s2, const CLabels *lab) const =0
virtual SGVector< float64_t > get_predictive_variances(SGVector< float64_t > mu, SGVector< float64_t > s2, const CLabels *lab=NULL) const =0
virtual SGVector< float64_t > get_second_moments(SGVector< float64_t > mu, SGVector< float64_t > s2, const CLabels *lab) const
virtual float64_t get_second_moment(SGVector< float64_t > mu, SGVector< float64_t > s2, const CLabels *lab, index_t i) const =0
virtual SGVector< float64_t > get_log_probability_fmatrix(const CLabels *lab, SGMatrix< float64_t > F) const
virtual SGVector< float64_t > get_predictive_log_probabilities(SGVector< float64_t > mu, SGVector< float64_t > s2, const CLabels *lab=NULL)
Class SGObject is the base class of all shogun objects.
Definition: SGObject.h:102
double float64_t
Definition: common.h:48
virtual bool supports_regression() const
virtual bool supports_binary() const
virtual SGVector< float64_t > get_log_probability_derivative_f(const CLabels *lab, SGVector< float64_t > func, index_t i) const =0
virtual SGVector< float64_t > get_predictive_means(SGVector< float64_t > mu, SGVector< float64_t > s2, const CLabels *lab=NULL) const =0
virtual SGVector< float64_t > get_third_derivative(const CLabels *lab, SGVector< float64_t > func, const TParameter *param) const
virtual float64_t get_first_moment(SGVector< float64_t > mu, SGVector< float64_t > s2, const CLabels *lab, index_t i) const =0
virtual SGVector< float64_t > get_first_derivative(const CLabels *lab, SGVector< float64_t > func, const TParameter *param) const
The Likelihood model base class.

SHOGUN Machine Learning Toolbox - Documentation