BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
featureSelection.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 
5 #ifndef BALL_QSAR_FEATURESELECTION_H
6 #define BALL_QSAR_FEATURESELECTION_H
7 
8 #ifndef BALL_QSAR_MODEL_H
9 #include <BALL/QSAR/Model.h>
10 #endif
11 
12 #ifndef BALL_QSAR_KERNELMODEL_H
13 #include <BALL/QSAR/kernelModel.h>
14 #endif
15 
16 #ifndef BALL_QSAR_LINEARMODEL_H
17 #include <BALL/QSAR/linearModel.h>
18 #endif
19 
20 #include <set>
21 
22 namespace BALL
23 {
24  namespace QSAR
25  {
26 
28  {
29  public:
34 
36 
38 
39  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
41 
42 
47  void setModel(Model& m);
48 
49  void setModel(KernelModel& km);
50 
55  void forwardSelection(int k=4, bool optPar=0);
56 
61  void backwardSelection(int k=4, bool optPar=0);
62 
63  void stepwiseSelection(int k=4, bool optPar=0);
64 
69  void twinScan(int k, bool optPar=0);
70 
75  void implicitSelection(LinearModel& lm, int act=1, double d=1);
76 
79  void removeHighlyCorrelatedFeatures(double& cor_threshold);
80 
81 
83  void removeLowResponseCorrelation(double& min_correlation);
84 
85 
87  void removeEmptyDescriptors();
88 
89  void selectStat(int s);
90 
93  void setQualityIncreaseCutoff(double& d);
95 
96 
97  private:
98 
102  void updateWeights(std::multiset<unsigned int>& oldDescIDs, std::multiset<unsigned int>& newDescIDs, Eigen::VectorXd& oldWeights);
104 
105 
111  std::multiset<unsigned int>* findIrrelevantDescriptors();
112 
114  Model* model_;
115 
117  Eigen::VectorXd* weights_;
118 
120  void forward(bool stepwise, int k, bool optPar);
121 
123  double quality_increase_cutoff_;
125  };
126  }
127 }
128 
129 
130 #endif // FEATURESEL
BALL_EXTERN_VARIABLE const double k
Definition: constants.h:93
#define BALL_EXPORT
Definition: COMMON/global.h:50