SHOGUN  v3.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
GaussianProcessMachine.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 _GAUSSIANPROCESSMACHINE_H_
00011 #define _GAUSSIANPROCESSMACHINE_H_
00012 
00013 #include <shogun/lib/config.h>
00014 #include <shogun/machine/Machine.h>
00015 #include <shogun/machine/gp/InferenceMethod.h>
00016 
00017 #ifdef HAVE_EIGEN3
00018 
00019 namespace shogun
00020 {
00021 
00033 class CGaussianProcessMachine : public CMachine
00034 {
00035 public:
00037     CGaussianProcessMachine();
00038 
00043     CGaussianProcessMachine(CInferenceMethod* method);
00044 
00045     virtual ~CGaussianProcessMachine();
00046 
00051     virtual const char* get_name() const { return "GaussianProcessMachine"; }
00052 
00061     SGVector<float64_t> get_posterior_means(CFeatures* data);
00062 
00071     SGVector<float64_t> get_posterior_variances(CFeatures* data);
00072 
00077     CInferenceMethod* get_inference_method() const
00078     {
00079         SG_REF(m_method);
00080         return m_method;
00081     }
00082 
00087     void set_inference_method(CInferenceMethod* method)
00088     {
00089         SG_REF(method);
00090         SG_UNREF(m_method);
00091         m_method=method;
00092     }
00093 
00098     virtual void set_labels(CLabels* lab)
00099     {
00100         CMachine::set_labels(lab);
00101         m_method->set_labels(lab);
00102     }
00103 
00109     virtual void store_model_features() { }
00110 
00111 private:
00112     void init();
00113 
00114 protected:
00116     CInferenceMethod* m_method;
00117 };
00118 }
00119 #endif /* HAVE_EIGEN3 */
00120 #endif /* _GAUSSIANPROCESSMACHINE_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation