Mlpack::perceptron::simpleweightupdate -
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.
Definition at line 40 of file simple_weight_update.hpp.
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.
Parameters:
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 55 of file simple_weight_update.hpp.
Generated automatically by Doxygen for MLPACK from the source code.