BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members
BALL::QSAR::FitModel Class Reference

#include <BALL/QSAR/fitModel.h>

Inheritance diagram for BALL::QSAR::FitModel:
BALL::QSAR::NonLinearModel BALL::QSAR::RegressionModel BALL::QSAR::Model

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< doublepredict (const vector< double > &substance, bool transform=1)
 
void setInitialGuess (vector< double > &d)
 
- Public Member Functions inherited from BALL::QSAR::NonLinearModel
 NonLinearModel (const QSARData &q)
 
 ~NonLinearModel ()
 

Private Attributes

Attributes
vector< StringallEquations_
 
vector< vector< String > > allDiffEquations_
 
vector< doubleinitial_guess_
 

Additional Inherited Members

- Public Attributes inherited from BALL::QSAR::RegressionModel
RegressionValidationvalidation
 
- Public Attributes inherited from BALL::QSAR::Model
const QSARDatadata
 
Validationmodel_val
 
- Protected Member Functions inherited from BALL::QSAR::NonLinearModel
virtual void calculateOffsets ()
 
- Protected Member Functions inherited from BALL::QSAR::RegressionModel
void readDescriptorInformationFromFile (std::ifstream &in, int no_descriptors, bool transformation, int no_coefficients)
 
void saveDescriptorInformationToFile (std::ofstream &out)
 
- Protected Attributes inherited from BALL::QSAR::RegressionModel
BALL::Matrix< doubletraining_result_
 
Vector< doubleoffsets_
 

Detailed Description

Definition at line 44 of file fitModel.h.

Constructor & Destructor Documentation

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 
)

Member Function Documentation

Vector<double> BALL::QSAR::FitModel::predict ( const vector< double > &  substance,
bool  transform = 1 
)
virtual
Predicts the activities of a given substance
Parameters
substancethe 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)
transformdetermines 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.
Returns
a RowVector containing one value for each predicted activity

Implements BALL::QSAR::Model.

void BALL::QSAR::FitModel::setEquations ( vector< String > &  eq,
vector< vector< String > > &  deq 
)
sets all equations and their derivatives 
Parameters
eqvector containing one equation for each column of Y
deqderivatives of each equation in one vector
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.

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.

Member Data Documentation

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.