Loading...
Searching...
No Matches
validation.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
//
#ifndef VALIDATION
#define VALIDATION
#ifndef QSARDATA
#include <BALL/QSAR/QSARData.h>
#endif
#include <iterator>
namespace BALL
{
namespace QSAR
{
class Model;
class BALL_EXPORT Validation
{
public:
Validation(Model* m);
virtual ~Validation();
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
virtual void crossValidation(int k, bool restore=1) = 0;
virtual double getCVRes() = 0;
virtual double getFitRes() = 0;
virtual void setCVRes(double d) = 0;
const Eigen::MatrixXd& getYRandResults() const;
virtual void testInputData(bool transform=0) = 0;
virtual void bootstrap(int k, bool restore=1) = 0;
virtual const Eigen::MatrixXd& yRandomizationTest(int runs, int k) = 0;
virtual void selectStat(int s) = 0;
int getStat() const;
virtual void saveToFile(string filename) const = 0;
virtual void readFromFile(string filename) = 0;
protected:
void setTrainingLine(int train_line, int current_line);
void setTestLine(int test_line, int current_line, bool back_transform=0);
void yRand();
vector<vector<double> > test_substances_;
Eigen::MatrixXd test_Y_;
vector<string> substances_names_;
Model* model_;
int validation_statistic_;
Eigen::MatrixXd yRand_results_;
};
}
}
#endif // VALIDATION
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
QSARData.h
BALL::QSAR::Model
Definition Model.h:35
BALL::QSAR::Validation::model_
Model * model_
Definition validation.h:114
BALL::QSAR::Validation::setTestLine
void setTestLine(int test_line, int current_line, bool back_transform=0)
BALL::QSAR::Validation::setCVRes
virtual void setCVRes(double d)=0
BALL::QSAR::Validation::crossValidation
virtual void crossValidation(int k, bool restore=1)=0
BALL::QSAR::Validation::test_substances_
vector< vector< double > > test_substances_
Definition validation.h:104
BALL::QSAR::Validation::getYRandResults
const Eigen::MatrixXd & getYRandResults() const
BALL::QSAR::Validation::getStat
int getStat() const
BALL::QSAR::Validation::getCVRes
virtual double getCVRes()=0
BALL::QSAR::Validation::saveToFile
virtual void saveToFile(string filename) const =0
BALL::QSAR::Validation::substances_names_
vector< string > substances_names_
Definition validation.h:110
BALL::QSAR::Validation::~Validation
virtual ~Validation()
BALL::QSAR::Validation::bootstrap
virtual void bootstrap(int k, bool restore=1)=0
BALL::QSAR::Validation::getFitRes
virtual double getFitRes()=0
BALL::QSAR::Validation::setTrainingLine
void setTrainingLine(int train_line, int current_line)
BALL::QSAR::Validation::selectStat
virtual void selectStat(int s)=0
BALL::QSAR::Validation::readFromFile
virtual void readFromFile(string filename)=0
BALL::QSAR::Validation::yRandomizationTest
virtual const Eigen::MatrixXd & yRandomizationTest(int runs, int k)=0
BALL::QSAR::Validation::test_Y_
Eigen::MatrixXd test_Y_
Definition validation.h:107
BALL::QSAR::Validation::validation_statistic_
int validation_statistic_
Definition validation.h:117
BALL::QSAR::Validation::yRand_results_
Eigen::MatrixXd yRand_results_
Definition validation.h:119
BALL::QSAR::Validation::testInputData
virtual void testInputData(bool transform=0)=0
BALL::QSAR::Validation::yRand
void yRand()
BALL::QSAR::Validation::Validation
Validation(Model *m)
BALL::QSAR
Definition allModel.h:17
BALL
Definition constants.h:13