Loading...
Searching...
No Matches
classificationValidation.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
//
#ifndef CLASVALIDATION
#define CLASVALIDATION
#ifndef QSARDATA
#include <BALL/QSAR/QSARData.h>
#endif
#ifndef VALIDATION
#include <BALL/QSAR/validation.h>
#endif
#include <iterator>
namespace BALL
{
namespace QSAR
{
class ClassificationModel;
class BALL_EXPORT ClassificationValidation : public Validation
{
public:
ClassificationValidation(ClassificationModel* m);
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
void crossValidation(int k, bool restore=1);
double getCVRes();
double getFitRes();
void setCVRes(double d);
void testInputData(bool transform=0);
const Eigen::MatrixXd* getConfusionMatrix();
const Eigen::VectorXd* getClassResults();
void bootstrap(int k, bool restore=1);
const Eigen::MatrixXd& yRandomizationTest(int runs, int k);
double getAccuracyCV();
double getAccuracyInputTest();
void selectStat(int s);
void saveToFile(string filename) const;
void saveToFile(string filename, const double& quality_input_test, const double& predictive_quality) const;
void readFromFile(string filename);
private:
void testAllSubstances(bool transform);
void calculateAverageSensitivity();
void calculateWeightedSensitivity();
void calculateOverallAccuracy();
void calculateAverageMCC();
void calculateOverallMCC();
void calculateTDR();
Eigen::MatrixXd confusion_matrix_;
Eigen::VectorXd class_results_;
double quality_;
double quality_input_test_;
double quality_cv_;
ClassificationModel* clas_model;
void (ClassificationValidation::* qualCalculation)();
};
}
}
#endif // REGVALIDATION
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
QSARData.h
BALL::QSAR::ClassificationModel
Definition classificationModel.h:28
BALL::QSAR::ClassificationValidation::ClassificationValidation
ClassificationValidation(ClassificationModel *m)
BALL::QSAR::ClassificationValidation::crossValidation
void crossValidation(int k, bool restore=1)
BALL::QSAR::ClassificationValidation::yRandomizationTest
const Eigen::MatrixXd & yRandomizationTest(int runs, int k)
BALL::QSAR::ClassificationValidation::getAccuracyCV
double getAccuracyCV()
BALL::QSAR::ClassificationValidation::saveToFile
void saveToFile(string filename) const
BALL::QSAR::ClassificationValidation::testInputData
void testInputData(bool transform=0)
BALL::QSAR::ClassificationValidation::setCVRes
void setCVRes(double d)
BALL::QSAR::ClassificationValidation::selectStat
void selectStat(int s)
BALL::QSAR::ClassificationValidation::getFitRes
double getFitRes()
BALL::QSAR::ClassificationValidation::readFromFile
void readFromFile(string filename)
BALL::QSAR::ClassificationValidation::bootstrap
void bootstrap(int k, bool restore=1)
BALL::QSAR::ClassificationValidation::getCVRes
double getCVRes()
BALL::QSAR::ClassificationValidation::saveToFile
void saveToFile(string filename, const double &quality_input_test, const double &predictive_quality) const
BALL::QSAR::ClassificationValidation::getClassResults
const Eigen::VectorXd * getClassResults()
BALL::QSAR::ClassificationValidation::getConfusionMatrix
const Eigen::MatrixXd * getConfusionMatrix()
BALL::QSAR::ClassificationValidation::getAccuracyInputTest
double getAccuracyInputTest()
BALL::QSAR::Validation::Validation
Validation(Model *m)
BALL::QSAR
Definition allModel.h:17
BALL
Definition constants.h:13
validation.h