Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

Algorithm Arena

An educational laboratory tool designed to demonstrate which machine learning algorithm fits which type of problem and why.

Rather than treating models as opaque black-box predictors, Algorithm Arena contrasts competing algorithmic paradigms on identical data manifolds to reveal the role of mathematical inductive bias.


Design System & Editorial Philosophy

Algorithm Arena is built with the aesthetics of a printed laboratory notebook rather than a generic tech dashboard:

  • Palette: Calm paper background (#F6F3EC), deep ink typography (#1B1B18), subtle paper tint (#EDE8DF), muted gray secondary annotations (#6B6B63), and a single rust accent (#C2410C) used sparingly for focus.
  • Typography: Google Fonts pairing Fraunces (editorial serif headings), Inter (crisp neutral body), and IBM Plex Mono (data tables, code, and metrics).
  • Geometry & Framing: Flat borders (1px solid #D9D4C7), maximum corner radius of 2px, left-aligned layout with generous whitespace, and a maximum width of ~1000px.
  • Zero Distractions: Strictly no gradients, glow, neon, purple tech palettes, emojis, or drop shadows. Streamlit's default chrome is suppressed via CSS.

Directory Structure

Algorithm-Arena/
├── app.py                      # Main entrypoint with st.navigation & 7 st.Page definitions
├── requirements.txt            # Project dependencies (Streamlit, scikit-learn, Plotly, PyTorch CPU)
├── README.md                   # Project documentation & run guide
├── .gitignore                  # Git ignore rules for venv, cache, and OS artifacts
├── .streamlit/
│   └── config.toml             # Streamlit theme configuration matching paper palette
├── assets/
│   └── style.css               # Editorial CSS design tokens, typography, and chrome resets
├── core/
│   ├── __init__.py             # Core package initializer
│   ├── ui.py                   # Reusable UI helpers (page_header, section, metric_row, why_box, load_css)
│   ├── datasets.py             # Fully implemented synthetic data wrappers (regression, classification, clustering, digits)
│   ├── plots.py                # Plotly editorial theme template and chart helpers
│   └── metrics.py              # Precision fit-timer and multi-task evaluation metrics (evaluate)
└── rounds/
    ├── __init__.py             # Rounds package initializer
    ├── r1_regression.py        # Round 1 scaffold: Continuous regression
    ├── r2_classification.py    # Round 2 scaffold: 2D Non-linear classification
    ├── r3_clustering.py        # Round 3 scaffold: Unsupervised geometric clustering
    ├── r4_images.py            # Round 4 scaffold: 8x8 Optical handwritten digits
    ├── r5_reinforcement.py     # Round 5 scaffold: Sequential gridworld decision-making
    └── cheatsheet.py           # Cheat Sheet: Model selection reference matrix

Setup Instructions

1. Activate the Virtual Environment

Windows (PowerShell):

.\venv\Scripts\Activate.ps1

Windows (Command Prompt):

venv\Scripts\activate.bat

macOS / Linux:

source venv/bin/activate

2. Install Dependencies

Install the requirements (including the PyTorch CPU build):

pip install -r requirements.txt

Running the Application

Launch the Streamlit app:

streamlit run app.py

Access the interface in your browser at http://localhost:8501.


Verification & Testing Checklist

  • Home Page: Verify 5 plain sentences explaining the project, the 5 rounds overview table, and the lab notebook "Why this won" callout.
  • Sidebar Navigation: Verify st.navigation lists all 7 pages (Home, Round 1 to 5, and Cheat Sheet) with active state indicators.
  • Editorial Aesthetics: Ensure the paper background (#F6F3EC), Fraunces serif headings, IBM Plex Mono code/metrics, 1px flat borders, and absence of emojis/gradients.
  • Round 1 to 5 Scaffolding: Verify each round renders its title, one-line problem statement, and the three required sections ("Controls", "Results", "Why this won").
  • Cheat Sheet: Verify the algorithm selection reference matrix comparing model archetypes, geometries, inductive biases, and interpretability.
  • Core Modules: Verify imports and tests for core.datasets, core.metrics, core.plots, and core.ui.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages