A Single Layer Perceptron for Regression: Part 4

 Testing - Observations, Rectifications, and Plans

1) Adding a second condition to end epochs: Till now, the only condition in the loop was that the difference between the errors of 2 consecutive epochs had to be within the threshold value.

This created an issue when the error value kept going up with each epoch.

I, hence, added another condition that checks if the current value is 0.2 values higher than the previous error. If yes, then the loop breaks.

Reason to use 0.2: While experimenting with the dataset, 0.2 gave the best results.

I hope to:
    a) Change 0.2 to an argument.
    b) Experiment with more datasets to find a more appropriate value to use.

2)   Need to add Accuracy metric: Currently, the code, only shows the error. However, I would like to add the R squared value as a metric to see how good the model is w.r.t. accuracy.


Code

 The new version of the code can be found on this link: 
https://github.com/HridayaAnnuncio247/Single-Layer-Perceptron



Dataset Used For Testing

The dataset used can also be found on the above link. 
I have only considered the first 3 attributes (numerical) and not the categorical attribute.

Comments

Popular posts from this blog

What Data Structure Do I use?

A single layer Perceptron for Regression: Part 1

A Single Layer Perceptron for Regression: Part 6