Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hyperparameter Optimization Using Optuna for MNIST Classification

This Jupyter notebook demonstrates hyperparameter optimization using Optuna to find optimal model architecture and training parameters for a multi-layer perceptron (MLP) on the MNIST digit classification task.

Key hyperparameters being optimized:

  • Learning rate
  • Hidden layer sizes
  • Network depth

The optimization process maximizes both classification accuracy and F1 score. Visualization of parameter importance and optimization history helps understand which hyperparameters have the strongest impact on model performance.

Requirements

  • Python 3.10+
  • Jupyter Notebook/Lab
  • Required Python packages:
    • pandas
    • numpy
    • matplotlib
    • seaborn
    • torch

Project Structure

project_root/
│
├── assets/  
├── data/
├── src/
│   ├── models.py
│   └── utils.py     
├── main.ipynb  
├── README.md
└── requirements.txt

Usage

  1. Create a virtul env:
python -m venv my_env
source .my_env/bin/activate
  1. Install the required dependencies:
pip install -r requirement.txt
  1. Run the jupyter notebook (main.ipynb) in colab or locally in VSCode.

Sample plots at the end of the jupyer notebook run

Parallel plot

Parallel plot

Importance plot

Importance Plot

About

automatic hyperparameter optimisation

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages