Skip to content

Python implementation for handwritten digit recognition using Naive Bayes. (Trained/Tested with MNIST)

Notifications You must be signed in to change notification settings

AndreBiedenkapp/NaivePyes

Repository files navigation

NaivePyes

Python Implementation for handwritten Digit recognition using naive Bayes. Trained and tested with the MNIST data set.

Requirements:

NaiveBayes.py

This is used to train the classifier and to predict with it. It outputs a confusion matrix. The accuracy of this classifier on the test set is 83.55%

NaiveBayesTwoClasses.py

This basically works like NaiveBayes.py but this creates five classifiers that can differentiate between two classes. Classifier 1 differentiates between 0 and 1 Classifier 2 differentiates between 2 and 5 Classifier 3 differentiates between 3 and 4 Classifier 4 differentiates between 6 and 9 Classifier 5 differentiates between 7 and 8 This also outputs a confusion matrix The classifiers alone all have accuracies above 93% but combined their accuracy on the test set is 81.06%

NaiveBayesDownsampledVersion.py

accuracy on the test set is sadly 82,43%

NaiveBayesTwoClassesDownsampledVersion.py

accuracy on the test set is 79.74%

NaiveBayesUI.py

This uses pygame to allow you to draw your own numbers. It will use NaiveBayes.py to classify your handwritten digit. NaiveBayesUI won't center your pictures, so the classifier will give the best results if you try to draw digits centered

About

Python implementation for handwritten digit recognition using Naive Bayes. (Trained/Tested with MNIST)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages