I have a an assignment to make a classifier for hand-written numbers with a limited data set of 500 samples. I am currently using python, I tried sklearn SVC with linear classifier and I got an accuracy of about 80%. I also tried KNN with 13 neighbors and got a max of 81% accuracy. I need to get to at least 90% accuracy. What are your suggestions that would help with training (adding noise? what distribution? / tilting the pictures with 90 degrees? Maybe cross validating over different parameters... etc).

Edit: To clarify the main challenge: I have to reach an accuracy of more that 90% with only using 500 samples, I can play around with the samples however I want to extend the data but I am not allowed to use external samples.

  • $\begingroup$ Try an SVM with a Gaussian instead of a linear kernel. $\endgroup$ Jan 22, 2017 at 22:10
  • $\begingroup$ I used rbf kernel, and did cross-validation over different values of C and gamma, but the accuracy stayed low. Linear kernel gave the highest accuracy but capped at 80%. $\endgroup$
    – zixmarkiz
    Jan 22, 2017 at 22:14
  • $\begingroup$ Have you read the literature on classifiers for handwritten digits using MNIST? There are dozens of papers, which a quick websearch can turn up, which describe a variety of techniques. Also, please edit the question with clarifications rather than leaving them in the comments -- we want questions to stand on their own, so people don't have to read the comments to understand the question and what approaches you've already tried. $\endgroup$
    – D.W.
    Jan 23, 2017 at 2:03

1 Answer 1


I suggest you the following:

  1. Adding a little bit of noise such as blurring
  2. Transforming the images. You can rotate or stretch a bit, but make sure you don't change too much to change 6 to 9 or o to 0.

You can look at the following tutorials:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.