Loading...
Searching...
No Matches
nBModel.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
//
#ifndef NBMODEL
#define NBMODEL
#ifndef BALL_QSAR_COMMON_H
#include <BALL/QSAR/common.h>
#endif
#ifndef BAYESMODEL
#include <BALL/QSAR/bayesModel.h>
#endif
#ifndef STATISTICS
#include <BALL/QSAR/statistics.h>
#endif
namespace BALL
{
namespace QSAR
{
class BALL_EXPORT NBModel : public BayesModel
{
public:
NBModel(const QSARData& q);
~NBModel();
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
void train();
Eigen::VectorXd predict(const vector<double>& substance, bool transform=1);
void saveToFile(string filename);
void readFromFile(string filename);
vector<double> getParameters() const;
void setParameters(vector<double>& v);
bool isTrained();
vector<double> calculateProbabilities(int activitiy_index, int feature_index, double feature_value);
int getNoResponseVariables();
private:
unsigned int discretization_steps_;
Eigen::MatrixXd min_max_;
vector<MatrixVector, Eigen::aligned_allocator<MatrixVector> > probabilities_;
};
}
}
#endif //NBMODEL
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
common.h
bayesModel.h
BALL::QSAR::BayesModel::BayesModel
BayesModel(const QSARData &q)
BALL::QSAR::NBModel::~NBModel
~NBModel()
BALL::QSAR::NBModel::isTrained
bool isTrained()
BALL::QSAR::NBModel::getNoResponseVariables
int getNoResponseVariables()
BALL::QSAR::NBModel::saveToFile
void saveToFile(string filename)
BALL::QSAR::NBModel::readFromFile
void readFromFile(string filename)
BALL::QSAR::NBModel::setParameters
void setParameters(vector< double > &v)
BALL::QSAR::NBModel::train
void train()
BALL::QSAR::NBModel::predict
Eigen::VectorXd predict(const vector< double > &substance, bool transform=1)
BALL::QSAR::NBModel::NBModel
NBModel(const QSARData &q)
BALL::QSAR::NBModel::calculateProbabilities
vector< double > calculateProbabilities(int activitiy_index, int feature_index, double feature_value)
BALL::QSAR::NBModel::getParameters
vector< double > getParameters() const
BALL::QSAR::QSARData
Definition QSARData.h:56
BALL::QSAR
Definition allModel.h:17
BALL
Definition constants.h:13
statistics.h