GitHunt
PA

pareshrnayak/confusion-matrix-generator

An open-source Streamlit web app to generate beautiful confusion matrices for multi-class machine learning models. Supports numeric and string labels, CSV upload, manual label entry, custom color maps, and displays evaluation metrics like Accuracy, Precision, Recall, and F1-score. Users can download the confusion matrix as an image.

Confusion Matrix Generator

An open-source Streamlit web app to generate beautiful confusion matrices for multi-class machine learning models. Supports numeric and string labels, CSV upload, manual label entry, custom color maps, and displays evaluation metrics like Accuracy, Precision, Recall, and F1-score. Users can download the confusion matrix as an image.

GitHub stars
License
Python Version


Confusion Matrix Generator


โœจ Features

  • Confusion matrices for binary & multi-class models
  • Numeric and string label support
  • CSV upload or manual input
  • Custom color maps
  • Accuracy, Precision, Recall & F1-score
  • Downloadable matrix image
  • Open-source Streamlit web app

๐Ÿš€ Live Demo

Try the app live here:

๐Ÿ”— https://confusion-matrix-gen.streamlit.app

No installation required โ€” simply upload a CSV file or enter labels manually and generate confusion matrices instantly.


๐Ÿ–ฅ๏ธ Run the App Locally (Step-by-Step)

Follow these steps to run the Confusion Matrix Generator on your local machine.

Step 1: Clone the Repository

Open your terminal and run:

git clone https://github.com/pareshrnayak/confusion-matrix-generator.git

Step 2: Move into the Project Directory

cd confusion-matrix-generator

Step 3: Install Dependencies

Make sure Python and pip are installed before running this command.

pip install -r requirements.txt

Virtual Environments (venv) are optional.
This works without creating one.

Step 4: Run the Streamlit App

python -m streamlit run app.py

Step 5: Open in Browser

Once the app starts, you will see a local URL like:

http://localhost:8501

Open it in your browser to use the app.


Project Structure

confusion-matrix-generator/
โ”œโ”€โ”€ app.py                 # Main Streamlit application
โ”œโ”€โ”€ requirements.txt       # Python dependencies
โ”œโ”€โ”€ README.md              # Project overview
โ”œโ”€โ”€ assets/
โ”‚   โ””โ”€โ”€ mockup.png         # UI mockup image
โ”œโ”€โ”€ .gitignore             # Ignored files
โ””โ”€โ”€ LICENSE                # MIT License

๐Ÿค Contributing

Contributions, issues, and feature requests are welcome!
Feel free to fork this repo and submit a pull request.


๐Ÿงฉ Open Source

This project is open-source and free to use under the MIT License.

pareshrnayak/confusion-matrix-generator | GitHunt