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