#include <BALL/QSAR/fitModel.h>
Public Member Functions | |
Constructors and Destructors | |
FitModel (const QSARData &q) | |
FitModel (const QSARData &q, vector< String > &eq, vector< double > &guess) | |
FitModel (const QSARData &q, vector< String > &eq, vector< vector< String > > &deq, vector< double > &guess) | |
Accessors | |
void | setEquations (vector< String > &eq, vector< vector< String > > &deq) |
void | setEquations (vector< String > &eq) |
void | train () |
Vector< double > | predict (const vector< double > &substance, bool transform=1) |
void | setInitialGuess (vector< double > &d) |
Private Attributes | |
Attributes | |
vector< String > | allEquations_ |
vector< vector< String > > | allDiffEquations_ |
vector< double > | initial_guess_ |
Definition at line 44 of file fitModel.h.
BALL::QSAR::FitModel::FitModel | ( | const QSARData & | q | ) |
BALL::QSAR::FitModel::FitModel | ( | const QSARData & | q, | |
vector< String > & | eq, | |||
vector< double > & | guess | |||
) |
BALL::QSAR::FitModel::FitModel | ( | const QSARData & | q, | |
vector< String > & | eq, | |||
vector< vector< String > > & | deq, | |||
vector< double > & | guess | |||
) |
Vector<double> BALL::QSAR::FitModel::predict | ( | const vector< double > & | substance, | |
bool | transform = 1 | |||
) | [virtual] |
Predicts the activities of a given substance
substance | the substance which activity is to be predicted in form of a vecor containing the values for *all* descriptors (if neccessary, relevant descriptors will be selected automatically) | |
transform | determines whether the values for each descriptor of the given substance should be transformed before prediction of activity. If (transform==1): each descriptor value is transformed according to the centering of the respective column of QSARData.descriptor_matrix used to train this model. If the substance to be predicted is part of the same input data (e.g. same SD-file) as the training data (as is the case during cross validation), transform should therefore be set to 0. |
Implements BALL::QSAR::Model.
void BALL::QSAR::FitModel::setEquations | ( | vector< String > & | eq | ) |
sets all equations but no derivatives. Since no derivatives are given, numerical derivation will be used during training.
sets all equations and their derivatives
eq | vector containing one equation for each column of Y | |
deq | derivatives of each equation in one vector |
void BALL::QSAR::FitModel::setInitialGuess | ( | vector< double > & | d | ) |
void BALL::QSAR::FitModel::train | ( | ) | [virtual] |
starts training the FitModel using Levenberg-Marquardt
Implements BALL::QSAR::Model.
vector<vector<String> > BALL::QSAR::FitModel::allDiffEquations_ [private] |
saves all derivatives of one equation in one vector
Definition at line 88 of file fitModel.h.
vector<String> BALL::QSAR::FitModel::allEquations_ [private] |
saves one equations for the prediction of each activitiy, i.e. one String for each column of Y
Definition at line 85 of file fitModel.h.
vector<double> BALL::QSAR::FitModel::initial_guess_ [private] |
saves the approximated coefficients for each equation, i.e. one String for each column of Y
Definition at line 93 of file fitModel.h.