SHOGUN  3.2.1
 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/lib/config.h>
17 
18 #include <shogun/base/SGObject.h>
19 #include <shogun/labels/Labels.h>
20 #include <shogun/lib/SGMatrix.h>
21 
22 namespace shogun
23 {
24 
27 {
34 };
35 
42 {
43 public:
46 
47  virtual ~CLikelihoodModel();
48 
78  const CLabels* lab=NULL);
79 
95  SGVector<float64_t> s2, const CLabels* lab=NULL) const=0;
96 
112  SGVector<float64_t> s2, const CLabels* lab=NULL) const=0;
113 
118  virtual ELikelihoodModelType get_model_type() const { return LT_NONE; }
119 
132  SGVector<float64_t> func) const=0;
133 
147  SGMatrix<float64_t> F) const;
148 
160  const CLabels* lab, SGVector<float64_t> func, index_t i) const=0;
161 
172  SGVector<float64_t> func, const TParameter* param) const
173  {
174  SG_ERROR("Can't compute derivative wrt %s parameter\n", param->m_name)
175  return SGVector<float64_t>();
176  }
177 
178 
190  SGVector<float64_t> func, const TParameter* param) const
191  {
192  SG_ERROR("Can't compute derivative wrt %s parameter\n", param->m_name)
193  return SGVector<float64_t>();
194  }
195 
207  SGVector<float64_t> func, const TParameter* param) const
208  {
209  SG_ERROR("Can't compute derivative wrt %s parameter\n", param->m_name)
210  return SGVector<float64_t>();
211  }
212 
230  SGVector<float64_t> s2, const CLabels* lab) const=0;
231 
247  SGVector<float64_t> s2, const CLabels* lab, index_t i) const=0;
248 
263  SGVector<float64_t> s2, const CLabels* lab) const;
264 
280  SGVector<float64_t> s2, const CLabels* lab, index_t i) const=0;
281 
296  SGVector<float64_t> s2, const CLabels* lab) const;
297 
302  virtual bool supports_regression() const { return false; }
303 
308  virtual bool supports_binary() const { return false; }
309 
314  virtual bool supports_multiclass() const { return false; }
315 };
316 }
317 #endif /* CLIKELIHOODMODEL_H_ */

SHOGUN Machine Learning Toolbox - Documentation