SYNOPSIS

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.

Detailed Description

Definition at line 40 of file simple_weight_update.hpp.

Member Function Documentation

void mlpack::perceptron::SimpleWeightUpdate::UpdateWeights (const arma::mat &trainData, arma::mat &weightVectors, const size_tlabelIndex, const size_tvectorIndex, const size_trowIndex, const arma::rowvec &D)\fC [inline]\fP

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.

Author

Generated automatically by Doxygen for MLPACK from the source code.