mlpack
1.0.12
|
Public Member Functions | |
void | UpdateWeights (const arma::mat &trainData, arma::mat &weightVectors, const size_t labelIndex, const size_t vectorIndex, const size_t rowIndex, const arma::rowvec &D) |
This function is called to update the weightVectors matrix. More... | |
Definition at line 32 of file simple_weight_update.hpp.
|
inline |
This function is called to update the weightVectors matrix.
It decreases the weights of the incorrectly classified class while increasing the weight of the correct class it should have been classified to.
trainData | The training dataset. |
weightVectors | Matrix of weight vectors. |
rowIndex | Index of the row which has been incorrectly predicted. |
labelIndex | Index of the vector in trainData. |
vectorIndex | Index of the class which should have been predicted. |
D | Cost of mispredicting the labelIndex instance. |
Definition at line 47 of file simple_weight_update.hpp.