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

SHOGUN Machine Learning Toolbox - Documentation