BALL
1.4.2
|
#include <BALL/QSAR/allModel.h>
Public Member Functions | |
Constructors and Destructors | |
ALLModel (const QSARData &q, double kw=4) | |
~ALLModel () | |
Public Member Functions inherited from BALL::QSAR::NonLinearModel | |
NonLinearModel (const QSARData &q) | |
~NonLinearModel () | |
Protected Attributes | |
Attributes | |
double | kw_ |
double | lambda_ |
Accessors | |
void | setKw (double kw) |
virtual Vector< double > | predict (const vector< double > &substance, bool transform=1) |
void | train () |
virtual bool | optimizeParameters (int d, int no_steps) |
double | getKw () |
virtual void | setParameters (vector< double > &v) |
virtual vector< double > | getParameters () const |
void | saveToFile (string filename) |
void | readFromFile (string filename) |
virtual void | calculateWeights (BALL::Matrix< double > &dist, BALL::Vector< double > &w) |
void | calculateXX (BALL::Vector< double > &w, BALL::Matrix< double > &res) |
void | calculateXY (BALL::Vector< double > &w, BALL::Matrix< double > &res) |
void | calculateEuclDistanceMatrix (BALL::Matrix< double > &m1, BALL::Matrix< double > &m2, BALL::Matrix< double > &output) |
Additional Inherited Members | |
Public Attributes inherited from BALL::QSAR::RegressionModel | |
RegressionValidation * | validation |
Public Attributes inherited from BALL::QSAR::Model | |
const QSARData * | data |
Validation * | model_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) |
class for automated lazy learning (ALL-QSAR)
Definition at line 40 of file allModel.h.
BALL::QSAR::ALLModel::~ALLModel | ( | ) |
|
protected |
calculates pairwise euclidean distance between all substances of m1 and m2 and saves them to BALL::Matrix<double> output
|
protectedvirtual |
Reimplemented in BALL::QSAR::KNNModel.
|
protected |
calculates weighted BALL::Matrix<double> X^T*X
|
protected |
calculates weighted BALL::Matrix<double> X^T*Y
double BALL::QSAR::ALLModel::getKw | ( | ) |
returns the current kernel width
|
virtual |
Reimplemented from BALL::QSAR::Model.
Reimplemented in BALL::QSAR::KNNModel.
|
virtual |
Tries to find the optimal kernel width for the current data. Therefore some training data must have been read by the connected QSARData object before running this method.
Reimplemented from BALL::QSAR::Model.
Reimplemented in BALL::QSAR::KNNModel.
|
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.
|
virtual |
reconstruct a saved Model from a file
Reimplemented from BALL::QSAR::RegressionModel.
|
virtual |
save Model to a file
Reimplemented from BALL::QSAR::RegressionModel.
void BALL::QSAR::ALLModel::setKw | ( | double | kw | ) |
|
virtual |
sets the model parameters according to the given values.
Reimplemented from BALL::QSAR::Model.
Reimplemented in BALL::QSAR::KNNModel.
|
inlinevirtual |
automated lazy learning does not have a seperate training step
Implements BALL::QSAR::Model.
Definition at line 59 of file allModel.h.
|
protected |
kernel width
Definition at line 99 of file allModel.h.
|
protected |
Definition at line 100 of file allModel.h.