mlpack  1.0.12
Public Member Functions | List of all members
mlpack::perceptron::SimpleWeightUpdate Class Reference

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...
 

Detailed Description

Definition at line 32 of file simple_weight_update.hpp.

Member Function Documentation

void mlpack::perceptron::SimpleWeightUpdate::UpdateWeights ( const arma::mat &  trainData,
arma::mat &  weightVectors,
const size_t  labelIndex,
const size_t  vectorIndex,
const size_t  rowIndex,
const arma::rowvec &  D 
)
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.

Parameters
trainDataThe training dataset.
weightVectorsMatrix of weight vectors.
rowIndexIndex of the row which has been incorrectly predicted.
labelIndexIndex of the vector in trainData.
vectorIndexIndex of the class which should have been predicted.
DCost of mispredicting the labelIndex instance.

Definition at line 47 of file simple_weight_update.hpp.


The documentation for this class was generated from the following file: