BALL 1.5.0
Loading...
Searching...
No Matches
snBModel.h
Go to the documentation of this file.
1// -*- Mode: C++; tab-width: 2; -*-
2// vi: set ts=2:
3//
4//
5
6#ifndef SNBMODEL
7#define SNBMODEL
8
9#ifndef BALL_QSAR_COMMON_H
10 #include <BALL/QSAR/common.h>
11#endif
12
13#ifndef STATISTICS
15#endif
16
17#ifndef BAYESMODEL
19#endif
20
21
22namespace BALL{
23 namespace QSAR {
24
27 {
28 public:
32 SNBModel(const QSARData& q);
33
36
37
41 void train();
42
43 Eigen::VectorXd predict(const vector<double>& substance, bool transform=1);
44
45 vector<double> getParameters() const;
46
47 void setParameters(vector<double>& v);
48
49 void saveToFile(string filename);
50
51 bool isTrained();
52
53 void readFromFile(string filename);
54
57 vector<double> calculateProbabilities(int activitiy_index, int feature_index, double feature_value);
58
61
62
63 private:
68 MatrixVector mean_;
69
71 MatrixVector stddev_;
72
73 static const double sqrt2Pi_;
74
75
76
78 };
79 }
80}
81
82#endif //SNBMODEL
std::vector< Eigen::MatrixXd, Eigen::aligned_allocator< Eigen::MatrixXd > > MatrixVector
Definition QSAR/common.h:10
vector< double > getParameters() const
void setParameters(vector< double > &v)
void readFromFile(string filename)
Eigen::VectorXd predict(const vector< double > &substance, bool transform=1)
SNBModel(const QSARData &q)
void saveToFile(string filename)
vector< double > calculateProbabilities(int activitiy_index, int feature_index, double feature_value)
#define BALL_EXPORT