BALL
1.4.1
|
00001 /* oplsModel.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 OPLSMODEL 00027 #define OPLSMODEL 00028 00029 #ifndef PLSMODEL 00030 #include <BALL/QSAR/plsModel.h> 00031 #endif 00032 00033 00034 00035 namespace BALL 00036 { 00037 namespace QSAR 00038 { 00039 class BALL_EXPORT OPLSModel : public PLSModel 00040 { 00041 public: 00045 OPLSModel(const QSARData& q); 00046 00047 ~OPLSModel(); 00049 00050 00053 00054 00056 void train(); 00057 00058 const Matrix<double>* getWOrtho(); 00059 00060 const Matrix<double>* getTOrtho(); 00061 00062 int getNoOrthoComponents(); 00063 00064 void setNoOrthoComponents(int d); 00065 00066 bool optimizeParameters(int k, int no_steps); 00067 //RowVector predict(const vector<double>& substance, bool transform); 00068 00069 void setParameters(vector<double>& v); 00070 00071 vector<double> getParameters() const; 00073 00074 00075 private: 00079 Matrix<double> T_ortho_; 00080 Matrix<double> W_ortho_; 00081 00082 int no_ortho_components_; 00084 }; 00085 } 00086 } 00087 00088 00089 #endif // OPLSMODEL