Look to notebooks/classification.ipynb
for a full, general tutorial on machine learning classification.
- 1. Introduction
- 2. Figures Created in the Tutorial
- 3. References
- 4. Appendix: Setup for New Developers
The models developed in classification.ipynb
explore classifying numbers from the MNIST database, a large database of handwritten digits that are commonly used for training various image processing systems. The database has been used so often it is sometimes called the "hello world" of machine learning classification.
Data science insights are derived through visualizations. Below, you can see some of the interesting figures you'll be able to generate from the notebook. I hope you enjoy the tutorial. 🌞
- Géron, A. (2019, October 15). Classification. Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow: Concepts, Tools, and Techniques to Build Intelligent Systems (2nd ed.) (pp. 85-108). O’Reilly Media.
- Aurelion Geron's Personal GitHub Notebook on Classification
- The MNIST Database's Wikipedia Page
- Professor Yann LeCun's Breakdown of Algorithms Applied to the MNIST Dataset
If you are fairly new to Python programming, I'd recommend the setting up this project by following these steps. If you want more in-depth knowledge about environment setup, I'd recommend you read my tutorial on interfacing with the computer like a software developer.
-
Download and install VS Code.
-
Install Python 3.12.4 (☑️ Add python.exe to PATH if you have no other Python versions installed).
-
Install Git bash.
-
Open VS Code.
-
Press
F1
, and in the command palette, search forTerminal: Select Default Profile
and set Git bash as the default terminal. -
Start a new terminal with
Ctrl
+`
. -
Clone this repository to a directory where you like to store your coding projects.
-
Open this repository (i.e. the
ml-classification
folder) as the current workspace folder withCtrl
+K
Ctrl
+O
. -
Make sure the terminal path points to the
qsnake
folder, and if it doesn't, navigate there viacd <path_to_ml_classification_folder>
. You can confirm you're in the right spot with quickls -la
command. -
From the terminal, run
pip install virtualenv
to install thevirtualenv
module. -
Run
python -m virtualenv <myenvname> --python=python3.12.4
to create a virtual environment that runs on Python 3.12.4. -
Activate the virtual environment with
source <myenvname>/Scripts/activate
. -
You should see
(<myenvname>)
two lines above the terminal input line when the environment is active. -
Press
F1
to open VS Code's command palette, then search forPython: Select Interpreter
and selectPython 3.12.4 64-bit ('<myenvname>':venv)
. -
Run
pip install -r requirements.txt
to install all dependencies on your activated virtual environment. -
Navigate to
notebooks/classification.ipynb
and read through the tutorial, running the cells as you go along if you'd like.