Introduction
This is again a note to myself. This code has been prepared following different tutorials and SO answers. I have tried to cover many of them in reference below. The notebook is commented to the best of my ability. Starting with 11% in first trial, the final model is able to achieve accuracy of 95%.
If you are new, you might want to read this first:
Introduction To Machine Learning
A tutorial To Find Best Scikit classifiers For Sentiment Analysis
Steps
- Import the data in a dataframe
- Make data series of pixel data and the label
- Split the data in test and train samples
- Use simple SVC without any tuning. (Got 11% accuracy)
- Modify the data. Take out the gradient of 0-255 and replace it with simple binary 0 and 1
- Again use SVC (Got 90% accuracy)
- Use GridSearchCV to find better value of parameters
- Again use SCV with the optimum value of parameters (Got 95% accuracy)
Code
Reference:
https://stackoverflow.com/questions/46330329/finding-the-values-of-c-and-gamma-to-optimise-svm
If you liked this article and would like one such blog to land in your inbox every week, consider subscribing to our newsletter: https://skillcaptain.substack.com
Hi nice reading yyour blog