BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
classificationModel.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 //
5 
6 #ifndef BALL_QSAR_CLASSIFICATIONMODEL_H
7 #define BALL_QSAR_CLASSIFICATIONMODEL_H
8 
9 #ifndef BALL_QSAR_MODEL_H
10 #include <BALL/QSAR/Model.h>
11 #endif
12 
13 #ifndef BALL_QSAR_CLASSIFICATIONVALIDATION_H
15 #endif
16 
17 #ifndef BALL_QSAR_EXCEPTION_H
18 #include <BALL/QSAR/exception.h>
19 #endif
20 
21 
22 namespace BALL
23 {
24  namespace QSAR
25  {
27  : public Model
28  {
29  public:
35  ClassificationModel(const QSARData& q);
36 
38 
39  virtual void operator=(ClassificationModel& m);
41 
42 
48 
49  std::vector<int> getClassLabels();
51 
52 
53  protected:
54 
59  void readLabels();
60 
62  std::vector<int> no_substances_;
64 
68  void readClassInformationFromFile(std::ifstream& input, int no_classes);
69  void saveClassInformationToFile(std::ofstream& out);
71 
72 
73 
82  void (ClassificationModel::* discretizeFeatures)(unsigned int bins, Eigen::MatrixXd& discretization_information);
83 
86  void (ClassificationModel::* discretizeTestDataFeatures)(Eigen::VectorXd& compound, unsigned int bins, const Eigen::MatrixXd& discretization_information);
87 
88 
90  void equalSpaceDiscretization(unsigned int bins, Eigen::MatrixXd& discretization_information);
91 
92  void equalSpaceDiscretizationTestData(Eigen::VectorXd& compound, unsigned int bins, const Eigen::MatrixXd& discretization_information);
93 
94 
96 
97 
102  std::vector<int> labels_;
104 
106 
107 
108 
109  };
110  }
111 }
112 
113 #endif // CLASSIFICATION
ClassificationValidation * validation
#define BALL_EXPORT
Definition: COMMON/global.h:50