#include <BALL/QSAR/classificationValidation.h>
class for validation of QSAR regression models
Definition at line 26 of file classificationValidation.h.
constructor
- Parameters
-
m | pointer to the regression model, which the object of this class should test |
void BALL::QSAR::ClassificationValidation::bootstrap |
( |
int |
k, |
|
|
bool |
restore = 1 |
|
) |
| |
|
virtual |
void BALL::QSAR::ClassificationValidation::crossValidation |
( |
int |
k, |
|
|
bool |
restore = 1 |
|
) |
| |
|
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)
Implements BALL::QSAR::Validation.
double BALL::QSAR::ClassificationValidation::getAccuracyCV |
( |
| ) |
|
get average accuracy value as determined after cross validation
double BALL::QSAR::ClassificationValidation::getAccuracyInputTest |
( |
| ) |
|
get average accuracy value as determined after testing of input data();
const Eigen::VectorXd* BALL::QSAR::ClassificationValidation::getClassResults |
( |
| ) |
|
returns a RowVector holding the one value contituting the validation result for each class if "average accuracy" or "average MCC" is chosen (see selectStat()).
const Eigen::MatrixXd* BALL::QSAR::ClassificationValidation::getConfusionMatrix |
( |
| ) |
|
return pointer to the matrix containing the number of TP, FP, TN, FN in one column for each class
double BALL::QSAR::ClassificationValidation::getCVRes |
( |
| ) |
|
|
virtual |
double BALL::QSAR::ClassificationValidation::getFitRes |
( |
| ) |
|
|
virtual |
void BALL::QSAR::ClassificationValidation::readFromFile |
( |
string |
filename | ) |
|
|
virtual |
void BALL::QSAR::ClassificationValidation::saveToFile |
( |
string |
filename | ) |
const |
|
virtual |
void BALL::QSAR::ClassificationValidation::saveToFile |
( |
string |
filename, |
|
|
const double & |
quality_input_test, |
|
|
const double & |
predictive_quality |
|
) |
| const |
void BALL::QSAR::ClassificationValidation::selectStat |
( |
int |
s | ) |
|
|
virtual |
select the desired statistic to be used for validating the models
- Parameters
-
s | if (s==1) R^2 and Q^2 are used
if(s==2) F_regr and F_cv are used. |
Implements BALL::QSAR::Validation.
void BALL::QSAR::ClassificationValidation::setCVRes |
( |
double |
d | ) |
|
|
virtual |
void BALL::QSAR::ClassificationValidation::testInputData |
( |
bool |
transform = 0 | ) |
|
|
virtual |
Fetches input data from QSARData and tests the current (unchanged) model with all these new substances (without cross-validation!).
- Parameters
-
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 |
Implements BALL::QSAR::Validation.
const Eigen::MatrixXd& BALL::QSAR::ClassificationValidation::yRandomizationTest |
( |
int |
runs, |
|
|
int |
k |
|
) |
| |
|
virtual |
Y randomization test
Randomizes all columns of model.Y, trains the model, runs crossValidation and testInputData and saves the resulting accuracy_input_test and accuracy_cv value to a vector, where Eigen::MatrixXd(i,0)=accuracy_input_test, Eigen::MatrixXd(i,1)=accuracy_cv
- Parameters
-
runs | this is repeated as often as specified by 'runs' |
Implements BALL::QSAR::Validation.