Coders Packet

Handwritten Digit Classification Data set in Python

By Suyash Singh

MNIST dataset has a total of 70000 images in which 60000 related to the training set and 10000 related to the testing set, its range between 0 to 255, where 0 is dark, 255 is white.

Firstly, we can store the MNIST data set  by using  "from sklearn.datasets import fetch_openml" "mnist=fetch_openml('mnist_784',version=1)" . Also we download some installation command  like "pip install numpy" ,"pip install matplotlib" .

from sklearn.linear_model import SGDClassifier(Importing SGDClassifier)

The MNIST dataset comprises written by hand digit pictures and it is separated in 60,000 models for the preparation set and 10,000 models for testing. In numerous papers just as in this instructional exercise, the official preparing set of 60,000 is isolated into a real preparing set of 50,000 models and 10,000 approval models (for choosing hyper-boundaries like learning rate and size of the model). All digit pictures have been size-standardized and focused in a fixed size picture of 28 x 28 pixels. In the first dataset, every pixel of the picture is spoken to by an incentive somewhere in the range of 0 and 255, where 0 is dark, 255 is white.

Mnist data set have 70,000 images in which 60000 images related to the Training dataset and 10000 images related to the testing data set, each image has 784 features. It has 28*28 pixel images.

 

 

Accuracy for MNIST data set is 98.22%

Download Complete Code

Comments

No comments yet

Download Packet

Reviews Report

Submitted by Suyash Singh (suyashpratap9453)

Download packets of source code on Coders Packet