BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
featureSelection.h
Go to the documentation of this file.
1 /* featureSelection.h
2  *
3  * Copyright (C) 2009 Marcel Schumann
4  *
5  * This file is part of QuEasy -- A Toolbox for Automated QSAR Model
6  * Construction and Validation.
7  * QuEasy is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3 of the License, or (at
10  * your option) any later version.
11  *
12  * QuEasy is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 // -*- Mode: C++; tab-width: 2; -*-
22 // vi: set ts=2:
23 //
24 //
25 
26 #ifndef FEATURESEL
27 #define FEATURESEL
28 
29 #ifndef MODEL
30 #include <BALL/QSAR/Model.h>
31 #endif
32 
33 #ifndef KMODEL
34 #include <BALL/QSAR/kernelModel.h>
35 #endif
36 
37 #ifndef LMODEL
38 #include <BALL/QSAR/linearModel.h>
39 #endif
40 
41 #include <set>
42 
43 namespace BALL
44 {
45  namespace QSAR
46  {
47 
49  {
50  public:
55 
57 
60 
61 
66  void setModel(Model& m);
67 
68  void setModel(KernelModel& km);
69 
74  void forwardSelection(int k=4, bool optPar=0);
75 
80  void backwardSelection(int k=4, bool optPar=0);
81 
82  void stepwiseSelection(int k=4, bool optPar=0);
83 
88  void twinScan(int k, bool optPar=0);
89 
94  void implicitSelection(LinearModel& lm, int act=1, double d=1);
95 
98  void removeHighlyCorrelatedFeatures(double& cor_threshold);
99 
100 
102  void removeLowResponseCorrelation(double& min_correlation);
103 
104 
106  void removeEmptyDescriptors();
107 
108  void selectStat(int s);
109 
112  void setQualityIncreaseCutoff(double& d);
114 
115 
116  private:
117 
121  void updateWeights(std::multiset<unsigned int>& oldDescIDs, std::multiset<unsigned int>& newDescIDs, Vector<double>& oldWeights);
123 
124 
130  std::multiset<unsigned int>* findIrrelevantDescriptors();
131 
134 
137 
139  void forward(bool stepwise, int k, bool optPar);
140 
144  };
145  }
146 }
147 
148 
149 #endif // FEATURESEL