Skip to content

Competitive AutoML with model tournaments, feature importance, prediction intervals, and what-if analysis in Streamlit.

Notifications You must be signed in to change notification settings

lancejepsen/ModelArena-AutoML

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

ModelArena

Competitive modeling with uncertainty you can trust

By Lance Jepsen & ChatGPT

Python Streamlit License AutoML Uncertainty

๐Ÿ‘ค Author

Lance Jepsen
Data Science ยท Machine Learning ยท AutoML Systems

๐Ÿ”— LinkedIn: https://www.linkedin.com/in/lance-jepsen/
๐ŸŽฅ Project walkthrough: https://www.youtube.com/watch?v=vGuiYdUlMI8

ModelArena (modelarena-automl) is a competitive AutoML system with conformal prediction and uncertainty-aware modeling.

ModelArena is a professional AutoML playground where machine learning models compete, uncertainty is quantified, and predictions become explainable.

ModelArena helps you compare models, understand what drives predictions, and make decisions with uncertainty-aware outputs (locally adaptive conformal prediction intervals for regression).

Itโ€™s built to be:

  • Beginner-friendly (learn ML by doing)
  • Professional-grade (tournament leaderboard + diagnostics + what-if)
  • Practical (works on your own CSVs in minutes)

๐Ÿš€ Quick Start (Run with Streamlit)

1) Prerequisites

  • Python 3.10+ recommended
  • Windows / macOS / Linux

2) Install

Open a terminal in the project folder:

# (optional) create & activate a virtual environment
python -m venv .venv

# Windows (PowerShell)
.venv\Scripts\Activate.ps1

# Windows (cmd)
.venv\Scripts\activate.bat

# macOS/Linux
source .venv/bin/activate

# install dependencies
python -m pip install --upgrade pip
pip install -r requirements.txt

3) Run the app

streamlit run app.py

Streamlit will print a local URL (usually http://localhost:8501). Open it in your browser.


๐Ÿ“‚ Included Sample Datasets (Start Here)

1๏ธโƒฃ sample_rent_regression.csv (Regression)

Goal: Predict monthly rent (a number)

Target column

target_monthly_rent_usd

Features

  • unit_size_sqft
  • bedrooms
  • bathrooms
  • year_built
  • distance_to_downtown_miles
  • crime_index
  • school_rating

2๏ธโƒฃ sample_tenant_renewal_classification.csv (Classification)

Goal: Predict tenant renewal (yes/no)

Target column

renewed_lease   (0 = No, 1 = Yes)

Features

  • monthly_rent
  • income_usd
  • tenure_months
  • late_payments
  • maintenance_requests
  • unit_size_sqft
  • satisfaction_score

๐Ÿง  Educational Walkthrough (Learn ML by Using ModelArena)

Step 1 โ€” Load a CSV

Upload one of the sample CSVs (or your own).

Tip: The target is the column you want to predict.

  • Regression target example: target_monthly_rent_usd
  • Classification target example: renewed_lease

Step 2 โ€” Choose Task

ModelArena works for both:

Task Predicts Examples
Regression a number rent, price, time, cost
Classification a category renewal, churn, fraud

Step 3 โ€” Choose Metric (This controls the โ€œwinnerโ€)

Regression

  • RMSE: penalizes large errors more
  • MAE: average absolute error, easy to interpret

Classification

  • Accuracy: % correct (simple baseline)
  • F1: better when classes are imbalanced
  • ROC-AUC: ranking quality (requires probabilities)

Important: If you choose ROC-AUC, ModelArena will only use models that can produce probabilities.


Step 4 โ€” Run Tournament

Click Run Tournament.

ModelArena will:

  1. train multiple models
  2. tune them (if tuning is enabled)
  3. rank them on your chosen metric
  4. crown a winner

Youโ€™ll see a leaderboard with the scores.


๐Ÿ” Diagnostics (How to Interpret Results)

โœ… Most Predictive Features

ModelArena ranks columns by permutation importance (model-agnostic):

  • Higher = more predictive of the outcome
  • Works for regression and classification

This is the โ€œWhich columns matter most?โ€ chart.


๐Ÿ“ˆ Regression: Predicted vs Actual

  • Points: predictions vs true values
  • Diagonal line: perfect predictions
  • Uncertainty band: prediction interval summary (adaptive conformal PI)

๐Ÿงฉ Classification: Confusion Matrix

Shows:

  • True positives / negatives
  • False positives / negatives

This helps you see what kind of mistakes the model is making.


๐Ÿ“ Prediction Intervals (Regression)

ModelArena provides locally adaptive conformal prediction intervals:

  • Distribution-free (doesnโ€™t assume normality)
  • Works with any winning model
  • Interval width adjusts by row (heteroskedastic)

Instead of only:

Predicted rent = $2,100

You also get:

95% interval โ‰ˆ [$1,920, $2,280]


๐Ÿ”ฎ Quick Prediction

After the tournament:

  • Enter feature values
  • Get an instant prediction
  • See uncertainty (regression) or class outcome (classification)

๐Ÿ” What-If / Counterfactual Simulator

Move sliders to answer:

  • โ€œWhat if unit size increases?โ€
  • โ€œWhat if income drops?โ€
  • โ€œWhat if crime index improves?โ€

Predictions update live to make ML intuitive.


๐Ÿงฉ Supported Models (current)

  • Linear Regression / Logistic Regression
  • Random Forest
  • ExtraTrees
  • HistGradientBoosting
  • XGBoost
  • LightGBM
  • CatBoost

๐Ÿ›  Troubleshooting

Streamlit command not found

If streamlit run app.py fails, reinstall:

pip install -r requirements.txt

Switching between regression & classification

If you switch datasets and see odd UI behavior, refresh the page to clear Streamlit state (or use the appโ€™s reset button if present).


๐Ÿ‘ค Authors

Lance Jepsen โ€“ product vision, architecture, ML direction
ChatGPT โ€“ co-developer, ML engineering, education & documentation


๐Ÿ“œ License

MIT License โ€” free to use, modify, and learn from.

About

Competitive AutoML with model tournaments, feature importance, prediction intervals, and what-if analysis in Streamlit.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages