Back to Home
Module 3: Agent-Driven End-to-End Sprints

Example 2: Reproducible ML Experiment Dashboard

Create a lightweight experiment dashboard similar to what researchers use to inspect model performance.

2Lesson 2 of 3
Goal: build a mini research dashboard that trains a model and visualises results.
  • Loads a real dataset
  • Trains a simple classifier
  • Displays accuracy and confusion matrix
  • Explains results in plain language

Step 1: Prompt the Agent

prompt
Build a small reproducible machine learning experiment dashboard.

Requirements:
- Use a dataset from scikit-learn (Breast Cancer or Digits dataset)
- Train a simple classifier (Logistic Regression)
- Split data into train and test sets
- Display:
  1. Accuracy score
  2. Confusion matrix
  3. Short explanation of the results
- Build the app using Streamlit
- The code must run end to end

Before coding:
- Explain the experiment design
- Justify the dataset and model choice
Then provide the full code.

Step 2: Agent Solution

The following code is the complete, runnable solution generated by the agent.

Step 2: Run and Verify

terminal
streamlit run app.py
Agent generated app

Agent generated app

Step 3: Try it Yourself

prompt
Extend the dashboard:
- Add a button to select the model type (Logistic Regression, Decision Tree, or Random Forest)
- Add more visualizations to compare the performance of different models
- Add a short explanation of why different models have different performance