Skip to content

This project demonstrates a complete end-to-end Machine Learning workflow using a Random Forest Classifier, along with an interactive Streamlit dashboard for real-time prediction and visualization.

Notifications You must be signed in to change notification settings

Akshitha0118/Random-Forest-Classifier-Machine-Learning-Deployment-with-Streamlit

Repository files navigation

Random-forest-classifier

🌲 Random Forest Classifier Dashboard

Social Network Ads – Machine Learning Project

This project demonstrates a complete end-to-end Machine Learning workflow using a Random Forest Classifier, along with an interactive Streamlit dashboard for real-time prediction and visualization.

The model predicts whether a customer will purchase a product based on:

  • Age
  • Estimated Salary

📌 Project Highlights

  • 🔹 Random Forest Classification (Entropy Criterion)
  • 🔹 Feature Scaling using StandardScaler
  • 🔹 Confusion Matrix Visualization
  • 🔹 ROC Curve & AUC Score
  • 🔹 Bias–Variance Analysis
  • 🔹 Decision Boundary Visualization (Train & Test)
  • 🔹 Model Serialization using Pickle
  • 🔹 Interactive Streamlit Dashboard with Dark UI

📂 Dataset

Dataset: Social Network Ads
Features Used:

  • Age
  • Estimated Salary

Target Variable:

  • Purchased (0 = No, 1 = Yes)

🧠 Machine Learning Workflow

  1. Data Loading & Preprocessing
  2. Train–Test Split (80% / 20%)
  3. Feature Scaling
  4. Random Forest Model Training
  5. Model Evaluation
    • Accuracy
    • Confusion Matrix
    • ROC Curve & AUC
    • Bias vs Variance
  6. Decision Boundary Visualization
  7. Model & Scaler Serialization
  8. Streamlit Dashboard Deployment

📊 Model Performance

  • Accuracy Score: Displayed in Dashboard
  • Bias: Training Score
  • Variance: Test Score
  • AUC Score: ROC Curve

📈 Visualizations Included

  • Confusion Matrix
  • ROC Curve
  • Decision Boundary (Training Set)
  • Decision Boundary (Test Set)

🖥️ Streamlit Dashboard Features

  • 🎚️ Sidebar sliders for Age & Salary
  • 🔮 Real-time Purchase Prediction
  • 📊 Model Metrics Display
  • 📈 ROC Curve Visualization
  • 🧮 Confusion Matrix
  • 🌙 Modern Dark-Theme UI

🛠️ Technologies Used

  • Python
  • NumPy
  • Pandas
  • Matplotlib
  • Scikit-learn
  • Streamlit
  • Pickle

📌 Future Enhancements

  • Add Cross-Validation
  • Hyperparameter Tuning
  • Multiple Classifiers Comparison
  • Deployment on Streamlit Cloud / Hugging Face Spaces
  • Feature Importance Visualization

About

This project demonstrates a complete end-to-end Machine Learning workflow using a Random Forest Classifier, along with an interactive Streamlit dashboard for real-time prediction and visualization.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages