#include <BALL/QSAR/knnModel.h>
Public Member Functions | |
void | calculateWeights (Matrix< double > &dist, Vector< double > &w) |
void | setParameters (vector< double > &v) |
vector< double > | getParameters () const |
bool | optimizeParameters (int k, int no_steps) |
Constructors and Destructors | |
KNNModel (const QSARData &q, int k=3) | |
Private Attributes | |
int | k_ |
class for automated lazy learning (ALL-QSAR)
Definition at line 39 of file knnModel.h.
BALL::QSAR::KNNModel::KNNModel | ( | const QSARData & | q, | |
int | k = 3 | |||
) |
vector<double> BALL::QSAR::KNNModel::getParameters | ( | ) | const [virtual] |
Reimplemented from BALL::QSAR::ALLModel.
bool BALL::QSAR::KNNModel::optimizeParameters | ( | int | d, | |
int | no_steps | |||
) | [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::ALLModel.
void BALL::QSAR::KNNModel::setParameters | ( | vector< double > & | ) | [virtual] |
sets the model parameters according to the given values.
Reimplemented from BALL::QSAR::ALLModel.
int BALL::QSAR::KNNModel::k_ [private] |
Definition at line 57 of file knnModel.h.