BALL  1.4.1
plsModel.h
Go to the documentation of this file.
00001 /* plsModel.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 PLSMODEL
00027 #define PLSMODEL
00028 
00029 #ifndef LMODEL
00030 #include <BALL/QSAR/linearModel.h>
00031 #endif
00032 
00033 #ifndef STATISTICS
00034 #include <BALL/QSAR/statistics.h>
00035 #endif
00036 
00037 #ifndef QSAR_EXCEPTION
00038 #include <BALL/QSAR/exception.h>
00039 #endif
00040 
00041 #include <BALL/QSAR/latentVariableModel.h>
00042 
00043 
00044 namespace BALL
00045 {
00046   namespace QSAR
00047   { 
00048     class BALL_EXPORT PLSModel : public LinearModel, public LatentVariableModel
00049     {
00050       public:
00056         PLSModel(const QSARData& q);
00057 
00058         ~PLSModel();
00060         
00061         
00067         virtual void train();
00068         
00070         virtual bool optimizeParameters(int k, int no_steps);
00071 
00073         void setNoComponents(int no);
00074         
00076         int getNoComponents();
00077         
00079         const Matrix<double>* getU();
00080         
00081         void setParameters(vector<double>& v);
00082         
00083         vector<double> getParameters() const;
00085     
00086         
00087       protected:
00091         
00092         Matrix<double> U_;
00093   
00094         int no_components_;
00096     };
00097   }
00098 }
00099 
00100 
00101 #endif // PLSMODEL
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines