Basic mnist classifier example of a Reproducible Research Project in Python
Project description
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:
- conda (installation instructions)
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
Built Distribution
Hashes for mnist_classifier-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3be7d2b4513cefd9602d56e488f636975cf9aed01b3e5a38aec8049aa677f6c1 |
|
MD5 | 098e53f1bb6d2e984d7e96ba9308b3a6 |
|
BLAKE2b-256 | 1019cf65272530359c3158c46cfea54054e9aa007244aaf28769e1009225ffe7 |