BALL
1.4.1
|
00001 /* kpcrModel.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 KPCRMODEL 00027 #define KPCRMODEL 00028 00029 #ifndef KMODEL 00030 #include <BALL/QSAR/kernelModel.h> 00031 #endif 00032 00033 #ifndef PCRMODEL 00034 #include <BALL/QSAR/pcrModel.h> 00035 #endif 00036 00037 #ifndef NLMODEL 00038 #include <BALL/QSAR/nonlinearModel.h> 00039 #endif 00040 00041 namespace BALL 00042 { 00043 namespace QSAR 00044 { 00046 class BALL_EXPORT KPCRModel : public KernelModel, public LatentVariableModel 00047 { 00048 public: 00052 KPCRModel(const QSARData& q, int k_type, double p1, double p2=-1); 00053 00054 KPCRModel(const QSARData& q, Vector<double>& w); 00055 00056 KPCRModel(const QSARData& q, String s1, String s2); 00057 00058 KPCRModel(const QSARData& q, const LinearModel& lm, int column); 00059 00060 ~KPCRModel(); 00062 00063 00068 void setFracVar(double frac_var); 00069 00070 void train(); 00071 00072 void setParameters(vector<double>& v); 00073 00074 vector<double> getParameters() const; 00076 00077 00078 private: 00079 00080 double frac_var_; 00081 }; 00082 } 00083 } 00084 00085 #endif //KPCRMODEL