SHOGUN  v3.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
GaussianProcessRegression.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  * Copyright (C) 2012 Jacob Walker
00009  * Copyright (C) 2013 Roman Votyakov
00010  */
00011 
00012 #ifndef _GAUSSIANPROCESSREGRESSION_H_
00013 #define _GAUSSIANPROCESSREGRESSION_H_
00014 
00015 #include <shogun/lib/config.h>
00016 
00017 #ifdef HAVE_EIGEN3
00018 
00019 #include <shogun/machine/GaussianProcessMachine.h>
00020 #include <shogun/machine/gp/InferenceMethod.h>
00021 #include <shogun/features/Features.h>
00022 #include <shogun/labels/Labels.h>
00023 
00024 namespace shogun
00025 {
00026 
00027 class CInferenceMethod;
00028 class CFeatures;
00029 class CLabels;
00030 
00034 class CGaussianProcessRegression : public CGaussianProcessMachine
00035 {
00036 public:
00038     MACHINE_PROBLEM_TYPE(PT_REGRESSION);
00039 
00041     CGaussianProcessRegression();
00042 
00047     CGaussianProcessRegression(CInferenceMethod* method);
00048 
00049     virtual ~CGaussianProcessRegression();
00050 
00056     virtual CRegressionLabels* apply_regression(CFeatures* data=NULL);
00057 
00062     SGVector<float64_t> get_mean_vector(CFeatures* data);
00063 
00068     SGVector<float64_t> get_variance_vector(CFeatures* data);
00069 
00074     virtual EMachineType get_classifier_type()
00075     {
00076         return CT_GAUSSIANPROCESSREGRESSION;
00077     }
00078 
00083     virtual const char* get_name() const { return "GaussianProcessRegression"; }
00084 
00085 protected:
00092     virtual bool train_machine(CFeatures* data=NULL);
00093 
00100     virtual bool is_label_valid(CLabels *lab) const
00101     {
00102         return lab->get_label_type()==LT_REGRESSION;
00103     }
00104 };
00105 }
00106 #endif /* HAVE_EIGEN3 */
00107 #endif /* _GAUSSIANPROCESSREGRESSION_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation