BALL
1.4.1
|
00001 /* gpModel.h 00002 * 00003 * Copyright (C) 2009 Marcel Schumann 00004 * 00005 * This file is part of QuEasy -- A Toolbox for Automated QSAR Model 00006 * Construction and Validation. 00007 * QuEasy is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation; either version 3 of the License, or (at 00010 * your option) any later version. 00011 * 00012 * QuEasy is distributed in the hope that it will be useful, but 00013 * WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 * General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with this program; if not, see <http://www.gnu.org/licenses/>. 00019 */ 00020 00021 // -*- Mode: C++; tab-width: 2; -*- 00022 // vi: set ts=2: 00023 // 00024 // 00025 00026 #ifndef GPMODEL 00027 #define GPMODEL 00028 00029 #ifndef KMODEL 00030 #include <BALL/QSAR/kernelModel.h> 00031 #endif 00032 00033 #ifndef NLMODEL 00034 #include <BALL/QSAR/nonlinearModel.h> 00035 #endif 00036 00037 namespace BALL 00038 { 00039 namespace QSAR 00040 { 00041 class BALL_EXPORT GPModel : public KernelModel 00042 { 00043 public: 00047 GPModel(const QSARData& q, int k_type, double p1, double p2=-1); 00048 00049 GPModel(const QSARData& q, Vector<double>& w); 00050 00052 GPModel(const QSARData& q, String s1, String s2); 00053 00054 GPModel(const QSARData& q, const LinearModel& lm, int column); 00055 00056 ~GPModel(); 00058 00062 void train(); 00063 00064 Vector<double> predict(const vector<double>& substance, bool transform=1); 00065 00067 double calculateStdErr(); 00068 00069 void setParameters(vector<double>& v); 00070 00071 vector<double> getParameters() const; 00073 00074 private: 00078 Matrix<double> L_; 00079 00081 Vector<double> input_; 00082 00083 Vector<double> K_t_; 00084 00085 double lambda_; 00087 }; 00088 } 00089 } 00090 00091 #endif // GPMODEL