vendredi 21 avril 2017

Increasing/decreasing in small steps

Consider a matrix:

Y Y Y N Y
N N N Y Y
Y N Y Y N

and a weights array

w=[0.1,0.6,0.5,0.2]

The last column for the matrix is actual_decisions column. Therefore there are only 4 elems in weights array

The accuracy for this matrix is computed as

for each row {
if sum of weights for 'Y' is greater than sum of weights for 'N'
then temporal_decision= Y;
if sum of weights for 'N' is greater than sum of weights for 'Y'
then temporal_decision= N;
}

Once the temporal_decisions for each row is found we look for the amount of temproal_decisions that are equal to actual_decisions and divide by amount of rows.

I need to randomly inclrease the weights for the matrix elements while the accuracy increases. I am doing all the process this way:

while (curr_accuracy <=next_accuracy) do
increase/decrease (weights_vector)
next_accuracy=calc_accuracy (weights_vector)




Aucun commentaire:

Enregistrer un commentaire