Skip to main content

Basic mnist classifier example of a Reproducible Research Project in Python

Project description

CircleCI Coverage Status Generic badge GitHub GitHub issues

Classifying digits using 28x28px images in one of 10 classes

Small classifier for 28x28px handwritten digits based on M-NIST dataset

License

MIT

Requirements

For this project to run properly you will need:

Installation

To use and reproduce this project, first clone this repository in the directory of your choice

cd /path/to/your/directory
git clone https://github.com/sandrich/classifying_digits_mnist.git

Then create a conda environment with the correct dependencies:

conda env create --file environment.yml

Once the conda has finished installing all the dependencies, activate it:

conda activate mnist_classifier

Usage

The program can run without parameters which will take our researched value. Feel free to use different parameters to play with the data and algorithm

$ python mnist_predict.py -h
usage: mnist_predict.py [-h] [--trees TREES] [--depth DEPTH] [--impurity_method {entropy,gini}]

Run MNIST classifier

optional arguments:
  -h, --help            show this help message and exit
  --trees TREES         Number of trees
  --depth DEPTH         Maximum tree depth
  --impurity_method {entropy,gini}
                        Impurity method

Example

# python mnist_predict.py 
No local fit dataset found.
Downloading fit data
['================================================='>'']]
Downloading fit labels
['================================================='>'']
No local test dataset found.
Downloading test data
['================================================='>'']]
Downloading test labels
['================================================='>'']
Starting training...
Done training.
Predicting...
Predicting...
Classification stats:
-----------------
Max tree depth: 9
Number of trees: 20
Impurity method: entropy
-----------------
Train Accuracy: 0.946
Train Accuracy: 0.935

Authors

@sandrich - Christian Sandrini @bigskapinsky - Calixte Mayoraz

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mnist-classifier-1.0.2.tar.gz (16.9 kB view hashes)

Uploaded Source

Built Distribution

mnist_classifier-1.0.2-py3-none-any.whl (22.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page