So, my question is a bit theoretical. I have been trying to implement a perceptron based classifier with outputs 1 and 0 depending on the category. I have used 2 methods: The example by Example learning method and Batch learning method. I also have defined another method which will measure accuracy according to the formulae number_of_samples_classified_correctly/total_number_of_samples(I'm not sure this should be the correct definition for accuracy and you are welcome to suggest a better measure). Now there are a few confusions i'm facing. Firstly, the accuracy of example by example learning is different from batch learning by 2%. Also the best accuracy achieved in both cases is depending on the slopes. So where exactly is the mistake?(Batch learning algorithm=error*input_vector( where error can be 1,-1 or 0 ) summed over all input vectors and then added to weights).
- For initial slope[1,-1] giving an accuracy of 88% example by example learning
- For initial slope[1,-1] giving an accuracy of 88% batch learning
- For initial slope[1,1] giving an accuracy of 84% example by example learning
- For initial slope[1,1] giving an accuracy of 86% batch learning
![For initial slope[1,-1] giving an accuracy of 88% example by example learning](../../images/9529d02ac99a9531bc589d92a078f9c1.webp)
![For initial slope[1,-1] giving an accuracy of 88% batch learning](../../images/e51fa989c60ba5611da22ca64ee804f7.webp)
![For initial slope[1,1] giving an accuracy of 84% example by example learning](../../images/2fd00dd05a2eca164f18f612f8b4e6ea.webp)
![For initial slope[1,1] giving an accuracy of 88% batch learning](../../images/b64cabbb1a65fb080e7082ac05746401.webp)