BALL
1.5.0
include
BALL
QSAR
nBModel.h
Go to the documentation of this file.
1
// -*- Mode: C++; tab-width: 2; -*-
2
// vi: set ts=2:
3
//
4
//
5
6
#ifndef NBMODEL
7
#define NBMODEL
8
9
#ifndef BALL_QSAR_COMMON_H
10
#include <
BALL/QSAR/common.h
>
11
#endif
12
13
#ifndef BAYESMODEL
14
#include <
BALL/QSAR/bayesModel.h
>
15
#endif
16
17
#ifndef STATISTICS
18
#include <
BALL/QSAR/statistics.h
>
19
#endif
20
21
namespace
BALL
22
{
23
namespace
QSAR
24
{
25
27
class
BALL_EXPORT
NBModel
:
public
BayesModel
28
{
29
public
:
33
NBModel
(
const
QSARData
& q);
34
35
~NBModel
();
36
37
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
39
40
44
void
train
();
45
46
Eigen::VectorXd
predict
(
const
vector<double>& substance,
bool
transform=1);
47
48
void
saveToFile
(
string
filename);
49
50
void
readFromFile
(
string
filename);
51
52
vector<double>
getParameters
()
const
;
53
54
void
setParameters
(vector<double>& v);
55
56
bool
isTrained
();
57
58
vector<double>
calculateProbabilities
(
int
activitiy_index,
int
feature_index,
double
feature_value);
59
60
int
getNoResponseVariables
();
62
63
64
private
:
68
69
unsigned
int
discretization_steps_;
70
71
73
Eigen::MatrixXd min_max_;
74
77
vector<MatrixVector, Eigen::aligned_allocator<MatrixVector> > probabilities_;
78
79
80
82
};
83
}
84
}
85
86
#endif //NBMODEL
BALL_EXPORT
#define BALL_EXPORT
Definition:
COMMON/global.h:50
BALL::QSAR::NBModel::setParameters
void setParameters(vector< double > &v)
BALL::QSAR::NBModel::NBModel
NBModel(const QSARData &q)
BALL::QSAR::NBModel::predict
Eigen::VectorXd predict(const vector< double > &substance, bool transform=1)
BALL::QSAR::NBModel::getParameters
vector< double > getParameters() const
BALL
Definition:
constants.h:13
BALL::QSAR::QSARData
Definition:
QSARData.h:56
BALL::QSAR::BayesModel
Definition:
bayesModel.h:19
BALL::QSAR::NBModel::train
void train()
common.h
BALL::QSAR::NBModel
Definition:
nBModel.h:28
statistics.h
BALL::QSAR::NBModel::readFromFile
void readFromFile(string filename)
BALL::QSAR::NBModel::saveToFile
void saveToFile(string filename)
BALL::QSAR::NBModel::getNoResponseVariables
int getNoResponseVariables()
bayesModel.h
BALL::QSAR::NBModel::isTrained
bool isTrained()
BALL::QSAR::NBModel::~NBModel
~NBModel()
BALL::QSAR::NBModel::calculateProbabilities
vector< double > calculateProbabilities(int activitiy_index, int feature_index, double feature_value)
Generated by
1.8.20