Digits Recognizer using Python and React. Train the model.
Do you have any questions? Contact us!
I agree the Terms of Service
published April 4, 2018
Today's topic is like an introduction into the combination of computer vision and machine learning. All that I'll do here is just fitting kNN model with the data of handwritten digits taken from theMNIST Databaseand also checking its accuracy.
#Set up environment
I'll be using Anacondaas my environment so I'll skip the step about installing the dependencies.
from sklearn.model_selection import train_test_split, cross_val_score
from sklearn.neighbors import KNeighborsClassifier
from sklearn.metrics import classification_report
from sklearn import datasets
import numpy as np
import matplotlib.pyplot as plt