Hello New Yorker, how are you doing dude? 😁
Because of the pandemic and my school is close right now so this might be a good time for me to dig in something I've always been interested. And here in this repository, the first images (hand-written digits) recognition model (I hope I could say this) I have built using a real famous dataset namely MNIST created by god of computer vision,Yann LeCun.
This repository is the first one about machine learning in my github but it's not like this is my first experience. I just don't have time 😆 (still, I am a novice after all)
This time I focus on classification task using K-nearest neighbors algorithm (via sklearn) to build a model that can predict hand-written digit images In the notebook files:
- the "building_knn.ipynb" is simply how I build the Knn model as well as select the best set of hyperparameters that make my model has the best generalization ability.
- note: I didn't use GridSearchCV to find the hyperparameters because I tried and It took over 2 hours to finish. I just did it manually but you can try 😆
- in "knnwithaugmentation.ipynb", I added a little bit of technique called "data augmentation" to the training set (specifically specking, the by 1 pixel shifted images) to see if it can help me improve the generalization ability of knn model
Well, since my school is close right now, I want to use the time to further my knowledge. After searching for a while, I've come across the book named Hands-On Machine Learning authored by Aurélien Géron. And undoubtedly this is one of the great books for sure, you guys better check it out
The code is entirely written in Python 3.8.8 and the main packages I utilized are:
- numpy
- scipy
- matplotlib
- sklearn