BALL  1.4.1
pcrModel.h
Go to the documentation of this file.
00001 /* pcrModel.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 PCRMODEL
00027 #define PCRMODEL
00028 
00029 #ifndef LMODEL
00030 #include <BALL/QSAR/linearModel.h>
00031 #endif
00032 
00033 #ifndef QSAR_EXCEPTION
00034 #include <BALL/QSAR/exception.h>
00035 #endif
00036 
00037 #include <BALL/QSAR/rrModel.h>
00038 
00039 #include <BALL/QSAR/latentVariableModel.h>
00040 
00041 
00042 namespace BALL 
00043 {
00044   namespace QSAR
00045   {
00046     class BALL_EXPORT PCRModel : public LinearModel, public LatentVariableModel
00047     {
00048       public:
00049 
00056         PCRModel(const QSARData& q, double frac_var=0.99);
00057 
00058         ~PCRModel();
00060         
00065         void train();
00066         
00067         
00069         void setFracVar(double frac_var);
00070         
00071         void setParameters(vector<double>& v);
00072         
00073         vector<double> getParameters() const;
00074         
00077         static void calculateEigenvectors(const Matrix<double>& data, double frac_var, Matrix<double>& output);
00079 
00080         
00081         
00082       protected:
00083         
00088         double frac_var_; 
00090 
00091     };
00092   }
00093 }
00094 
00095 #endif // PCRMODEL
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines