BALL
1.4.2
|
#include <BALL/QSAR/validation.h>
Public Member Functions | |
Constructors and Destructors | |
Validation (Model *m) | |
virtual | ~Validation () |
Protected Attributes | |
Attributes | |
vector< vector< double > > | test_substances_ |
Matrix< double > | test_Y_ |
vector< string > | substances_names_ |
Model * | model_ |
int | validation_statistic_ |
Matrix< double > | 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 Matrix< double > & | getYRandResults () const |
virtual void | testInputData (bool transform=0)=0 |
virtual void | bootstrap (int k, bool restore=1)=0 |
virtual const Matrix< double > & | 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 45 of file validation.h.
BALL::QSAR::Validation::Validation | ( | Model * | m | ) |
|
virtual |
|
pure virtual |
Implemented in BALL::QSAR::RegressionValidation, and BALL::QSAR::ClassificationValidation.
|
pure virtual |
Starts cross-validation with k steps. \n
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
return the result of the previous response permutation test .\n
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!). \n
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 134 of file validation.h.
|
protected |
contains the names of all current test-substances
Definition at line 130 of file validation.h.
|
protected |
contains all substances whose activities are to be predicted by the next call of testAllSubstances()
Definition at line 124 of file validation.h.
contains the experimentally determined results (activities) for all current test-substances in one column for each activity
Definition at line 127 of file validation.h.
|
protected |
the selected validation statistic
Definition at line 137 of file validation.h.
Definition at line 139 of file validation.h.