GaussianLikelihood.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  * Copyright (C) 2012 Jacob Walker
00008  */
00009 
00010 #ifndef CGAUSSIANLIKELIHOOD_H_
00011 #define CGAUSSIANLIKELIHOOD_H_
00012 #include <shogun/lib/config.h>
00013 #ifdef HAVE_EIGEN3
00014 
00015 #include <shogun/regression/gp/LikelihoodModel.h>
00016 
00017 namespace shogun
00018 {
00019 
00026 class CGaussianLikelihood: public CLikelihoodModel
00027 {
00028   
00029 public:
00030 
00031     /*Constructor*/
00032     CGaussianLikelihood();
00033 
00034     /*Destructor*/
00035     virtual ~CGaussianLikelihood();
00036 
00042     virtual const char* get_name() const { return "GaussianLikelihood"; }
00043 
00048     float64_t get_sigma() {return m_sigma;}
00049 
00054     void set_sigma(float64_t s) {m_sigma = s;}
00055 
00061     virtual SGVector<float64_t> evaluate_means(SGVector<float64_t>& means);
00062 
00068     virtual SGVector<float64_t> evaluate_variances(SGVector<float64_t>& vars);
00069     
00074     virtual ELikelihoodModelType get_model_type() {return LT_GAUSSIAN;}
00075 
00084     virtual float64_t get_log_probability_f(CRegressionLabels* labels,
00085             SGVector<float64_t> f);
00086 
00087 
00099     virtual SGVector<float64_t> get_log_probability_derivative_f(
00100             CRegressionLabels* labels, SGVector<float64_t> f, index_t i);
00101 
00113     virtual SGVector<float64_t> get_first_derivative(CRegressionLabels* labels,
00114             TParameter* param, CSGObject* obj, SGVector<float64_t> function);
00115 
00132     virtual SGVector<float64_t> get_second_derivative(CRegressionLabels* labels,
00133             TParameter* param, CSGObject* obj, SGVector<float64_t> function);
00134 
00135 private:
00137     float64_t m_sigma;
00138 
00139     /*Initialize function*/
00140     void init();
00141 };
00142 
00143 }
00144 #endif /* HAVE_EIGEN3 */
00145 #endif /* CGAUSSIANLIKELIHOOD_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation