Skip to content

Latest commit

ย 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿง  Multi-Model ML Classification Visualizer

Python

Scikit-Learn

Streamlit

Pandas

NumPy

Matplotlib

GitHub


An interactive Machine Learning Classification Dashboard built using Python, Scikit-Learn, and Streamlit that enables users to upload custom datasets, preprocess data, train multiple machine learning classification models, compare their performance using various evaluation metrics, and visualize results through an intuitive web interface.

Rather than requiring users to write repetitive machine learning code, this application provides an end-to-end experimentation environment where multiple classification algorithms can be trained and evaluated within a few clicks.

Designed with a modular software architecture, the project separates preprocessing, model training, evaluation, and visualization into reusable components, making it scalable, maintainable, and deployment-ready.

๐Ÿš€ Live Demo

๐ŸŒ Streamlit Application

https://multimodelmlvisualizer-3xbjtvfke7tal9jqkvuymu.streamlit.app


๐Ÿ’ป GitHub Repository

https://github.com/SHALINISAURAV/Multi_Model_ML_Visualizer


๐Ÿ“Œ Built With

  • Python
  • Streamlit
  • Scikit-Learn
  • Pandas
  • NumPy
  • Matplotlib
  • Seaborn

๐Ÿ“– Project Overview

Machine Learning experimentation typically involves multiple disconnected steps such as data preprocessing, model training, evaluation, visualization, and comparison. These tasks are often performed across different notebooks or scripts, making the workflow repetitive, time-consuming, and difficult to manage.

The Multi-Model ML Classification Visualizer was developed to simplify this process by bringing the complete classification pipeline into a single interactive application.

The dashboard allows users to upload their own classification datasets, perform preprocessing, train multiple machine learning models simultaneously, compare their performance using standard evaluation metrics, and visualize the results without writing additional code.

The application follows software engineering principles by organizing the project into separate modules for preprocessing, model training, evaluation, visualization, and utility functions. This modular design improves readability, maintainability, scalability, and future extensibility.

Whether used for learning machine learning concepts, experimenting with different algorithms, or rapidly comparing models on new datasets, the application provides a practical and user-friendly solution for classification tasks.

๐Ÿ’ผ Business Problem

In real-world organizations, selecting the most suitable machine learning model for a classification problem is rarely straightforward. Data scientists and analysts often need to experiment with multiple algorithms before identifying the one that delivers the best performance.

However, this process usually requires:

  • Writing repetitive preprocessing code
  • Training one model at a time
  • Switching between multiple notebooks
  • Manually calculating evaluation metrics
  • Creating visualizations separately
  • Comparing results across different experiments

These repetitive tasks increase development time and make machine learning experimentation less efficient.

For beginners, the process can be even more challenging because it requires understanding several libraries, workflows, and evaluation techniques before meaningful comparisons can be made.# ๐Ÿ’ผ Business Problem

In real-world organizations, selecting the most suitable machine learning model for a classification problem is rarely straightforward. Data scientists and analysts often need to experiment with multiple algorithms before identifying the one that delivers the best performance.

However, this process usually requires:

  • Writing repetitive preprocessing code
  • Training one model at a time
  • Switching between multiple notebooks
  • Manually calculating evaluation metrics
  • Creating visualizations separately
  • Comparing results across different experiments

These repetitive tasks increase development time and make machine learning experimentation less efficient.

For beginners, the process can be even more challenging because it requires understanding several libraries, workflows, and evaluation techniques before meaningful comparisons can be made.

๐Ÿ’ก Proposed Solution

This project provides an interactive dashboard that automates the complete machine learning classification workflow.

Instead of manually writing preprocessing and training code for every experiment, users simply upload a CSV dataset, select the target column, choose one or more machine learning models, and train them through an intuitive graphical interface.

The application automatically performs:

  • Dataset loading
  • Data preprocessing
  • Feature scaling
  • Train-test splitting
  • Multi-model training
  • Performance evaluation
  • Result comparison
  • Visual analytics
  • Best model identification

By integrating all these components into a single application, the project significantly reduces the effort required to compare machine learning models while improving accessibility for students, developers, educators, and data practitioners.

โœจ Key Features

The application is divided into multiple functional modules, each responsible for a specific stage of the machine learning workflow.


๐Ÿ“‚ Dataset Management

  • Upload custom CSV classification datasets
  • Interactive dataset preview
  • Display dataset dimensions (rows and columns)
  • Dynamic target column selection
  • Support for binary and multiclass classification datasets

โš™๏ธ Data Preprocessing

The preprocessing pipeline prepares the dataset before model training by performing:

  • Feature and target separation
  • Missing value handling
  • Train-test splitting
  • Feature scaling using StandardScaler
  • Consistent preprocessing across all selected models

๐Ÿค– Machine Learning Models

The dashboard currently supports multiple supervised classification algorithms:

  • Logistic Regression
  • K-Nearest Neighbors (KNN)
  • Decision Tree Classifier
  • Naive Bayes
  • Support Vector Machine (SVM)
  • Random Forest Classifier
  • AdaBoost Classifier
  • Gradient Boosting Classifier

Users can train one model or compare multiple models simultaneously.


๐Ÿ“Š Model Evaluation

Automatically evaluates every trained model using:

  • Accuracy
  • Precision
  • Recall
  • F1 Score
  • ROC-AUC Score

The results are displayed in a comparison table, making it easier to identify the best-performing model.


๐Ÿ“ˆ Visualization Dashboard

The application generates multiple visualizations, including:

  • Model Accuracy Comparison
  • Confusion Matrix
  • ROC Curve
  • Feature Importance (for supported models)

These visualizations help users better understand model performance beyond numerical metrics.


๐Ÿ† Best Model Identification

The application automatically identifies the best-performing model based on evaluation metrics, allowing users to quickly compare algorithms and select the most suitable one.

๐Ÿ”„ End-to-End Machine Learning Pipeline

The application follows a structured machine learning workflow from raw dataset to model comparison.

                 User
                   โ”‚
                   โ–ผ
          Upload CSV Dataset
                   โ”‚
                   โ–ผ
          Dataset Exploration
                   โ”‚
                   โ–ผ
        Target Column Selection
                   โ”‚
                   โ–ผ
        Data Preprocessing
     (Cleaning โ€ข Scaling โ€ข Split)
                   โ”‚
                   โ–ผ
       Machine Learning Models
                   โ”‚
                   โ–ผ
        Model Training Pipeline
                   โ”‚
                   โ–ผ
      Performance Evaluation
                   โ”‚
                   โ–ผ
     Interactive Visualizations
                   โ”‚
                   โ–ผ
      Best Model Identification

Every stage of the pipeline is modular, making the application easy to maintain and extend with additional preprocessing techniques, machine learning models, and evaluation methods.

๐Ÿ—๏ธ Project Architecture

The project follows a modular software engineering architecture where each component has a single responsibility.

                        app.py
                           โ”‚
        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ”‚                  โ”‚                  โ”‚
        โ–ผ                  โ–ผ                  โ–ผ
Preprocessing        Model Training      Evaluation
(preprocess.py)   (model_training.py)   (metrics.py)
        โ”‚                  โ”‚                  โ”‚
        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                       โ”‚
                       โ–ผ
                Visualization
                  (plots.py)
                       โ”‚
                       โ–ผ
                 Streamlit UI

This architecture separates business logic from the user interface, improving maintainability, readability, scalability, and code reusability.

๐Ÿ“ Project Structure

Multi_Model_ML_Visualizer/
โ”‚
โ”œโ”€โ”€ app.py
โ”‚   โ”œโ”€โ”€ Main Streamlit application
โ”‚   โ”œโ”€โ”€ Handles user interaction
โ”‚   โ””โ”€โ”€ Connects all project modules
โ”‚
โ”œโ”€โ”€ data/
โ”‚   โ””โ”€โ”€ Sample classification dataset
โ”‚
โ”œโ”€โ”€ preprocessing/
โ”‚   โ””โ”€โ”€ preprocess.py
โ”‚       โ”œโ”€โ”€ Dataset loading
โ”‚       โ”œโ”€โ”€ Feature-target separation
โ”‚       โ”œโ”€โ”€ Train-test splitting
โ”‚       โ””โ”€โ”€ Feature scaling
โ”‚
โ”œโ”€โ”€ models/
โ”‚   โ””โ”€โ”€ model_training.py
โ”‚       โ”œโ”€โ”€ Model initialization
โ”‚       โ”œโ”€โ”€ Model selection
โ”‚       โ””โ”€โ”€ Training pipeline
โ”‚
โ”œโ”€โ”€ evaluation/
โ”‚   โ””โ”€โ”€ metrics.py
โ”‚       โ”œโ”€โ”€ Accuracy
โ”‚       โ”œโ”€โ”€ Precision
โ”‚       โ”œโ”€โ”€ Recall
โ”‚       โ”œโ”€โ”€ F1 Score
โ”‚       โ””โ”€โ”€ ROC-AUC
โ”‚
โ”œโ”€โ”€ visualization/
โ”‚   โ””โ”€โ”€ plots.py
โ”‚       โ”œโ”€โ”€ Accuracy comparison
โ”‚       โ”œโ”€โ”€ Confusion Matrix
โ”‚       โ”œโ”€โ”€ ROC Curve
โ”‚       โ””โ”€โ”€ Feature Importance
โ”‚
โ”œโ”€โ”€ utils/
โ”‚   โ””โ”€โ”€ Helper functions
โ”‚
โ”œโ”€โ”€ notebooks/
โ”‚   โ””โ”€โ”€ Experimental notebooks
โ”‚
โ”œโ”€โ”€ saved_models/
โ”‚   โ””โ”€โ”€ Generated comparison results
โ”‚
โ”œโ”€โ”€ requirements.txt
โ”‚
โ”œโ”€โ”€ README.md
โ”‚
โ””โ”€โ”€ .gitignore

๐Ÿ› ๏ธ Technology Stack

Category Technologies
Programming Language Python
Machine Learning Scikit-Learn
Data Manipulation Pandas, NumPy
Visualization Matplotlib, Seaborn
Web Framework Streamlit
Development Environment Jupyter Notebook
Version Control Git & GitHub
Deployment Streamlit Community Cloud

Libraries Used

  • streamlit
  • pandas
  • numpy
  • scikit-learn
  • matplotlib
  • seaborn
  • joblib

๐Ÿค– Machine Learning Models Implemented

The dashboard currently supports eight supervised machine learning classification algorithms.

Model Purpose
Logistic Regression Baseline linear classifier for binary classification
K-Nearest Neighbors Instance-based learning using nearest neighbors
Decision Tree Rule-based classification model
Naive Bayes Probabilistic classifier based on Bayes' theorem
Support Vector Machine Effective for high-dimensional datasets
Random Forest Ensemble learning using multiple decision trees
AdaBoost Boosting algorithm combining weak learners
Gradient Boosting Sequential ensemble model for improved predictive performance

The modular architecture allows additional machine learning algorithms to be integrated with minimal code changes.

๐Ÿ“Š Model Evaluation

After training, each selected machine learning model is evaluated using multiple performance metrics to provide a comprehensive comparison.

Metric Description
Accuracy Measures the overall percentage of correctly classified instances.
Precision Indicates how many predicted positive instances are actually positive.
Recall Measures the model's ability to correctly identify positive instances.
F1 Score Harmonic mean of Precision and Recall, useful for imbalanced datasets.
ROC-AUC Score Evaluates the model's ability to distinguish between different classes across various classification thresholds.

Instead of relying on a single metric, the application evaluates every model across multiple performance measures, enabling more informed model selection.

๐Ÿ“ˆ Interactive Visualizations

To make model evaluation more intuitive, the dashboard provides several visual analytics.

๐Ÿ“Š Accuracy Comparison

A bar chart compares the accuracy of all selected machine learning models, allowing quick identification of the best-performing algorithm.


๐Ÿ“‰ Confusion Matrix

The Confusion Matrix illustrates:

  • True Positives
  • True Negatives
  • False Positives
  • False Negatives

This helps users understand how well each model classifies different categories.


๐Ÿ“ˆ ROC Curve

The Receiver Operating Characteristic (ROC) Curve demonstrates the trade-off between the True Positive Rate and False Positive Rate across different thresholds.

A higher Area Under Curve (ROC-AUC) generally indicates better classification performance.


โญ Feature Importance

For tree-based algorithms such as Random Forest and Gradient Boosting, the dashboard displays the most influential features contributing to predictions.

This improves model interpretability by highlighting which variables have the greatest impact on classification.

๐Ÿ“ท Application Screenshots

Note: The screenshots below demonstrate the application's workflow.

Screen Description
Home Page Landing interface of the application
Dataset Upload Uploading a CSV dataset
Dataset Preview Preview of uploaded data
Target Selection Selecting the target variable
Model Selection Choosing machine learning algorithms
Model Comparison Performance comparison table
Accuracy Chart Model accuracy visualization
Confusion Matrix Classification performance
ROC Curve ROC-AUC visualization
Feature Importance Top contributing features
assets/
โ””โ”€โ”€ screenshots/
    โ”œโ”€โ”€ home.png
    โ”œโ”€โ”€ upload.png
    โ”œโ”€โ”€ preview.png
    โ”œโ”€โ”€ comparison.png
    โ”œโ”€โ”€ confusion_matrix.png
    โ”œโ”€โ”€ roc_curve.png
    โ””โ”€โ”€ feature_importance.png

โš™๏ธ Engineering Decisions

Several design decisions were made during development to improve maintainability, usability, and scalability.


Why Streamlit?

Streamlit enables rapid development of interactive data science applications while requiring minimal frontend code.


Why Modular Architecture?

Instead of placing all logic inside a single script, the project was divided into dedicated modules:

  • Preprocessing
  • Model Training
  • Evaluation
  • Visualization
  • Utility Functions

This separation improves code readability, testing, debugging, and future scalability.


Why StandardScaler?

Many machine learning algorithms, such as Logistic Regression, Support Vector Machine, and K-Nearest Neighbors, are sensitive to feature magnitudes.

Applying feature scaling ensures fair comparison across models.


Why Scikit-Learn?

Scikit-Learn provides reliable implementations of classical machine learning algorithms while maintaining a consistent API for training and evaluation.


Why Multiple Evaluation Metrics?

Accuracy alone may not always represent model quality.

Using Precision, Recall, F1 Score, and ROC-AUC enables more robust performance comparison across different datasets.

๐Ÿšง Challenges Faced During Development

Developing this project involved solving several real-world engineering challenges beyond simply training machine learning models.

Some of the key challenges included:

  • Handling missing values before model training.
  • Preventing users from selecting invalid target columns.
  • Managing feature scaling consistently across different algorithms.
  • Supporting multiple machine learning models through a common training pipeline.
  • Computing evaluation metrics for different classification outputs.
  • Designing reusable preprocessing and evaluation functions.
  • Integrating multiple visualization components within Streamlit.
  • Structuring the project using modular software engineering principles.
  • Preparing the application for cloud deployment using Streamlit Community Cloud.
  • Debugging preprocessing, evaluation, and visualization issues during development.

Addressing these challenges helped improve both the robustness of the application and my understanding of practical machine learning engineering.

๐Ÿง  ML Engineering Skills Demonstrated

This project demonstrates practical Machine Learning Engineering concepts, including:

  • End-to-end machine learning workflow development
  • Modular Python project organization
  • Data preprocessing pipelines
  • Feature engineering workflow
  • Model training automation
  • Comparative benchmarking of multiple ML algorithms
  • Performance evaluation using multiple metrics
  • Interactive dashboard development
  • Data visualization for model analysis
  • Software engineering best practices
  • Version control using Git & GitHub
  • Deployment using Streamlit Community Cloud

Rather than focusing solely on model accuracy, this project emphasizes building reusable, maintainable, and deployment-ready machine learning software.

๐ŸŽฏ Learning Outcomes

Building this project provided hands-on experience across multiple stages of the Machine Learning lifecycle.

Machine Learning

  • Supervised Classification
  • Model Selection
  • Performance Comparison
  • Evaluation Metrics
  • Feature Scaling
  • Data Preprocessing

Software Engineering

  • Modular Project Structure
  • Code Reusability
  • Function-Based Architecture
  • Separation of Concerns
  • Version Control using Git & GitHub

Data Visualization

  • Performance Comparison Charts
  • Confusion Matrix Visualization
  • ROC Curve Analysis
  • Feature Importance Visualization

Deployment

  • Streamlit Application Development
  • Streamlit Community Cloud Deployment
  • Dependency Management
  • GitHub Repository Management

Through this project, I gained practical experience in building machine learning applications that are interactive, reusable, and deployment-ready rather than focusing solely on notebook-based experimentation.

๐Ÿ”ฎ Future Enhancements

The current version establishes a strong foundation for machine learning experimentation. Several enhancements can further improve the application.

Model Optimization

  • Hyperparameter Tuning
  • GridSearchCV Integration
  • RandomizedSearchCV
  • Cross Validation

Explainable AI

  • SHAP Explainability
  • LIME Interpretability
  • Feature Contribution Analysis

Advanced Machine Learning

  • XGBoost
  • LightGBM
  • CatBoost
  • Voting Classifier
  • Stacking Classifier

User Experience

  • Dark Mode Support
  • Better Dashboard Design
  • Download Evaluation Reports
  • Export Trained Models
  • Save Model Comparison Results

Deployment Improvements

  • Docker Containerization
  • REST API Integration using FastAPI
  • Authentication & User Management
  • Cloud Storage Integration
  • CI/CD Pipeline using GitHub Actions

The modular architecture of the project makes these future enhancements straightforward to integrate.

โš™๏ธ Installation

Clone the repository

git clone https://github.com/SHALINISAURAV/Multi_Model_ML_Visualizer.git

Move into the project directory

cd Multi_Model_ML_Visualizer

Create a virtual environment

python -m venv venv

Activate the virtual environment

Windows

venv\Scripts\activate

macOS / Linux

source venv/bin/activate

Install dependencies

pip install -r requirements.txt

Run the Streamlit application

streamlit run app.py

The application will open automatically in your default browser.

๐Ÿš€ How to Use

Using the application is simple.

Step 1

Upload a CSV classification dataset.

โ†“

Step 2

Select the target column.

โ†“

Step 3

Choose one or multiple machine learning models.

โ†“

Step 4

Adjust the test size and random state if required.

โ†“

Step 5

Click Train Models.

โ†“

Step 6

Compare the evaluation metrics.

โ†“

Step 7

Analyze the generated visualizations.

โ†“

Step 8

Identify the best-performing model.

The application performs the complete machine learning workflow automatically.

๐Ÿงช Example Datasets

The application has been tested on standard classification datasets, including:

  • Breast Cancer Wisconsin Dataset
  • Iris Dataset
  • Wine Dataset
  • Heart Disease Dataset
  • Pima Indians Diabetes Dataset

The dashboard supports any properly formatted CSV file designed for binary or multiclass classification.

๐ŸŒŸ Why This Project?

Many machine learning projects stop after training a model inside a Jupyter Notebook.

This project goes beyond notebook experimentation by transforming the complete machine learning workflow into a reusable, interactive, and deployment-ready application.

Rather than focusing on achieving the highest possible accuracy on a single dataset, the objective was to build a practical tool that demonstrates software engineering principles alongside machine learning concepts.

The project emphasizes:

  • Modular Architecture
  • Code Reusability
  • Interactive User Experience
  • Comparative Model Analysis
  • Data Visualization
  • Deployment Readiness

This reflects the type of engineering workflow commonly followed when developing production-oriented machine learning applications.

โญ Repository Highlights

โœ” Modular Project Structure

โœ” End-to-End Machine Learning Workflow

โœ” Multiple Classification Algorithms

โœ” Interactive Streamlit Dashboard

โœ” Comparative Model Evaluation

โœ” Performance Visualization

โœ” Deployment Ready

โœ” Clean & Maintainable Codebase

โœ” Beginner-Friendly UI

โœ” Scalable Architecture

๐Ÿ‘ฉโ€๐Ÿ’ป Author

Shalini Saurav

B.Tech โ€“ Computer Science Engineering-[Data Science]

Aspiring AI Engineer | Machine Learning Engineer | Generative AI Developer

Connect with Me


I enjoy building practical AI and Machine Learning applications that combine software engineering principles with intelligent systems.

I am currently focused on developing projects in:

  • Machine Learning
  • Artificial Intelligence
  • Generative AI
  • NLP
  • RAG Systems
  • AI Engineering

๐Ÿ“„ License

This project is intended for educational purposes and personal portfolio demonstration.

Feel free to fork the repository, explore the implementation, and build upon it for learning.

If you use this project as inspiration, appropriate attribution is appreciated.


โญ If you found this project helpful, consider giving it a star!

Built with โค๏ธ using Python, Scikit-Learn, and Streamlit

Turning Machine Learning Workflows into Interactive Applications.