SHOGUN  v3.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
LogitLikelihood.h
Go to the documentation of this file.
00001 /*
00002  * This program is free software; you can redistribute it and/or modify
00003  * it under the terms of the GNU General Public License as published by
00004  * the Free Software Foundation; either version 3 of the License, or
00005  * (at your option) any later version.
00006  *
00007  * Written (W) 2013 Roman Votyakov
00008  */
00009 
00010 #ifndef _LOGITLIKELIHOOD_H_
00011 #define _LOGITLIKELIHOOD_H_
00012 
00013 #include <shogun/lib/config.h>
00014 
00015 #ifdef HAVE_EIGEN3
00016 
00017 #include <shogun/machine/gp/LikelihoodModel.h>
00018 
00019 namespace shogun
00020 {
00021 
00028 class CLogitLikelihood : public CLikelihoodModel
00029 {
00030 public:
00032     CLogitLikelihood();
00033 
00034     virtual ~CLogitLikelihood();
00035 
00040     virtual const char* get_name() const { return "LogitLikelihood"; }
00041 
00056     virtual SGVector<float64_t> get_predictive_means(SGVector<float64_t> mu,
00057             SGVector<float64_t> s2, const CLabels* lab=NULL) const;
00058 
00073     virtual SGVector<float64_t> get_predictive_variances(SGVector<float64_t> mu,
00074             SGVector<float64_t> s2, const CLabels* lab=NULL) const;
00075 
00080     virtual ELikelihoodModelType get_model_type() const { return LT_LOGIT; }
00081 
00093     virtual SGVector<float64_t> get_log_probability_f(const CLabels* lab,
00094             SGVector<float64_t> func) const;
00095 
00106     virtual SGVector<float64_t> get_log_probability_derivative_f(
00107             const CLabels* lab, SGVector<float64_t> func, index_t i) const;
00108 
00125     virtual SGVector<float64_t> get_log_zeroth_moments(SGVector<float64_t> mu,
00126             SGVector<float64_t> s2, const CLabels* lab) const;
00127 
00142     virtual float64_t get_first_moment(SGVector<float64_t> mu,
00143             SGVector<float64_t> s2, const CLabels* lab, index_t i) const;
00144 
00159     virtual float64_t get_second_moment(SGVector<float64_t> mu,
00160             SGVector<float64_t> s2, const CLabels* lab, index_t i) const;
00161 
00166     virtual bool supports_binary() const { return true; }
00167 };
00168 }
00169 #endif /* HAVE_EIGEN3 */
00170 #endif /* _LOGITLIKELIHOOD_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation