Skip to content

zrbecker/mnist_sklearn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MNIST in Python with sklearn

The mnist dataset and description was obtained from here: http://yann.lecun.com/exdb/mnist/

This repository contains some utility functions for reading the MNIST data from the fileformat they come in.

There is a script create_image.py that is useful for visualizing the mnist data.

Example:

python create_image.py --input data/train-images.idx3-ubyte \
    --rows 10 --cols 10 \
    --output data\mnist_images_sm.png

This should output this image:
MNIST Images

There is a script mnist_learning.py that uses sklearn to train a model, and score it's accuracy on the test data set.

Example:

python mnist_learning.py --train_images data/train-images.idx3-ubyte \
    --train_labels data/train-labels.idx1-ubyte \
    --test_images data/t10k-images.idx3-ubyte \
    --test_labels data/t10k-labels.idx1-ubyte

You can choose what classifier you want to use below the comment

###
### CHOOSE MODEL HERE
###

in the mnist_learning.py file.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages