BALL
1.4.79
|
#include <BALL/QSAR/validation.h>
Public Member Functions | |
Constructors and Destructors | |
Validation (Model *m) | |
virtual | ~Validation () |
Protected Attributes | |
Attributes | |
vector< vector< double > > | test_substances_ |
Eigen::MatrixXd | test_Y_ |
vector< string > | substances_names_ |
Model * | model_ |
int | validation_statistic_ |
Eigen::MatrixXd | yRand_results_ |
Accessors | |
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 |
void | setTrainingLine (int train_line, int current_line) |
void | setTestLine (int test_line, int current_line, bool back_transform=0) |
void | yRand () |
interface class for validation of QSAR-models
Definition at line 23 of file validation.h.
BALL::QSAR::Validation::Validation | ( | Model * | m | ) |
|
virtual |
|
pure virtual |
Implemented in BALL::QSAR::ClassificationValidation, and BALL::QSAR::RegressionValidation.
|
pure virtual |
Starts cross-validation with k steps.
Data is taken from QSARData.descriptor_matrix and is in each step divided into training- and test-data.
(Data having already been copied into Model.descriptor_matrix will be deleted)
Implemented in BALL::QSAR::RegressionValidation, and BALL::QSAR::ClassificationValidation.
|
pure virtual |
fetches the result of cross-validation
Implemented in BALL::QSAR::RegressionValidation, and BALL::QSAR::ClassificationValidation.
|
pure virtual |
fetches the quality of fit to the input data, as calculated by testInputData()
Implemented in BALL::QSAR::RegressionValidation, and BALL::QSAR::ClassificationValidation.
int BALL::QSAR::Validation::getStat | ( | ) | const |
return the ID of selected validation statistic
const Eigen::MatrixXd& BALL::QSAR::Validation::getYRandResults | ( | ) | const |
return the result of the previous response permutation test .
The return matrix is empty if no such test has been run yet
|
pure virtual |
restore validation-results from a file
Implemented in BALL::QSAR::RegressionValidation, and BALL::QSAR::ClassificationValidation.
|
pure virtual |
save the result of the applied validation methods to a file
Implemented in BALL::QSAR::RegressionValidation, and BALL::QSAR::ClassificationValidation.
|
pure virtual |
select the desired statistic to be used for validating the models
s | if (s==1) R^2 and Q^2 are used if(s==2) F_regr and F_cv are used. |
Implemented in BALL::QSAR::RegressionValidation, and BALL::QSAR::ClassificationValidation.
|
pure virtual |
set the result of cross-validation to the given value
Implemented in BALL::QSAR::RegressionValidation, and BALL::QSAR::ClassificationValidation.
|
protected |
copies one substance (=one line from class QSARData) and its activity into the test data set
back_transform | descriptor values are transformed back to in order to un-do centering |
|
protected |
copies one substance (=one line from class QSARData) and its activity into the training data set
|
pure virtual |
Fetches input data from QSARData and tests the current (unchanged) model with all these new substances (without cross-validation!).
transform | if transform==1, the test data is transformed in the same way that the training data was transformed before predicting activities. If training and test substances are taken from the same input file, set transform to 0 |
Implemented in BALL::QSAR::RegressionValidation, and BALL::QSAR::ClassificationValidation.
|
protected |
randomizes all columns of Model.Y_
|
pure virtual |
Implemented in BALL::QSAR::RegressionValidation, and BALL::QSAR::ClassificationValidation.
|
protected |
pointer to the model, which the object of this class should test
Definition at line 114 of file validation.h.
|
protected |
contains the names of all current test-substances
Definition at line 110 of file validation.h.
|
protected |
contains all substances whose activities are to be predicted by the next call of testAllSubstances()
Definition at line 104 of file validation.h.
|
protected |
contains the experimentally determined results (activities) for all current test-substances in one column for each activity
Definition at line 107 of file validation.h.
|
protected |
the selected validation statistic
Definition at line 117 of file validation.h.
|
protected |
Definition at line 119 of file validation.h.