TExcelTAD
Home › ML Projects: 15 End-to-End Builds › Presenting Your Projects

Presenting Your Projects

A project nobody can understand, rerun or trust is worth little, to an employer reading your portfolio and to a team deciding whether to use your model. This lesson turns the write-ups of the projects into something you can show: a repository layout that others can run, a README whose numbers can be checked, a headline metric with its uncertainty, a model card, and a one-page summary for people who will never read the code. Two small tools help: a bootstrap interval for the number you report, and a generator that writes the results table of the README from the experiment log, so the two can never disagree.

What a reviewer looks for

Someone reviewing an ML project, for a job or before a release, asks the same questions in roughly this order:

  1. What problem, for whom, and how is success measured? If the first screen does not say it, many readers stop.
  2. Is there a baseline? A score of 0.93 means nothing until you know that "always predict the majority" scores 0.91.
  3. Is the evaluation honest? Which split, how many test samples, was the test set used once, was preprocessing fitted on training data only?
  4. Where does it fail? An error analysis with slices shows that you understand the model, not just its average.
  5. Can I run it? One command to reproduce the main number, with pinned versions and seeds.
  6. What are the limits? Data that is synthetic, old, small or from one source; groups the model has not been checked on; uses it must not be put to.

The red flags are the mirror image: accuracy on a 99/1 problem, a test score better than the validation score with no explanation, a notebook that only runs top to bottom on the author's machine, numbers in the README that do not match any output, and no limitations section.

A repository that others can run

text
house-prices/
  README.md               problem, results table, how to reproduce, limitations
  MODEL_CARD.md           the model card (see below)
  pyproject.toml          pinned dependencies (or requirements.lock.txt)
  Makefile                make data / make train / make evaluate / make serve
  data/README.md          source, licence, how to get or generate it (no raw personal data in git)
  src/house_prices/
    data.py               loading or the generator, with a seed
    features.py           the preprocessing pipeline
    train.py              fits on train, logs every run
    evaluate.py           opens the test set once, writes reports/metrics.json
    serve.py              the FastAPI app
  tests/                  data checks, a tiny end-to-end training run, API tests
  reports/
    metrics.json          written by evaluate.py, the source of every number in the README
    experiments.csv       the experiment log
    figures/

The layout follows the course's MLOps lessons: a pipeline that can be rerun (ML pipelines), pinned environments and seeds (reproducibility), tests for data and code (testing ML code) and data that is versioned or regenerable rather than committed (data versioning). The one rule that matters most: every number in the README comes from a file the code wrote, never typed by hand.

Report a number with its uncertainty

A test score is measured on a finite sample, so it is an estimate. A bootstrap gives a simple interval: resample the test rows with replacement many times, recompute the metric each time, and take the middle 95 % of the results (holdout and k-fold discusses the variance of a single split). It needs only the stored test labels and predictions, not the model.

python · try it yourself
import numpy as np
from sklearn.datasets import make_classification
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import f1_score
from sklearn.model_selection import train_test_split

X, y = make_classification(n_samples=2000, n_features=10, n_informative=5, weights=[0.85], random_state=3)
X_tr, X_te, y_tr, y_te = train_test_split(X, y, test_size=400, stratify=y, random_state=3)
pred = RandomForestClassifier(n_estimators=200, random_state=0).fit(X_tr, y_tr).predict(X_te)

def bootstrap_ci(y_true, y_pred, metric, n_boot=2000, seed=0):
    rng = np.random.default_rng(seed)
    n = len(y_true)
    stats = []
    for _ in range(n_boot):
        idx = rng.integers(0, n, n)                 # resample test rows with replacement
        stats.append(metric(y_true[idx], y_pred[idx]))
    return np.percentile(stats, [2.5, 97.5])

f1 = f1_score(y_te, pred)
lo, hi = bootstrap_ci(y_te, pred, f1_score)
print(f"test F1 {f1:.3f} (95 % bootstrap interval {lo:.3f}-{hi:.3f}), n = {len(y_te)}, positives = {y_te.sum()}")

for n_test in (100, 400):
    sub = slice(0, n_test)
    lo, hi = bootstrap_ci(y_te[sub], pred[sub], f1_score)
    print(f"  first {n_test:3} test rows only: interval width {hi - lo:.3f}")
test F1 0.828 (95 % bootstrap interval 0.747-0.896), n = 400, positives = 63
  first 100 test rows only: interval width 0.281
  first 400 test rows only: interval width 0.149

"F1 0.828" alone suggests a precision the data does not have: with 63 positives among 400 test rows, the interval runs from 0.747 to 0.896. With only 100 test rows it would be about 0.28 wide, so two models 0.05 apart could not be told apart at all. Write the headline as "test F1 0.828 (95 % bootstrap interval 0.747–0.896, 400 rows, 63 positives)", and be suspicious of any comparison whose difference is smaller than the interval.

Generate the README table from the log

The experiment log of the project workflow already holds every run. A few lines turn it into the Markdown table of the README, with the baseline marked and the chosen model in bold, so the README is rebuilt whenever the results change:

python · try it yourself
import pandas as pd

log = pd.DataFrame([
    {"run": "DummyClassifier", "role": "baseline", "val_f1": 0.000, "test_f1": None},
    {"run": "LogisticRegression", "role": "simple", "val_f1": 0.701, "test_f1": None},
    {"run": "RandomForestClassifier", "role": "chosen", "val_f1": 0.812, "test_f1": 0.828},
    {"run": "HistGradientBoosting", "role": "candidate", "val_f1": 0.805, "test_f1": None},
])

def markdown_table(df, bold_role="chosen"):
    cols = ["run", "role", "val_f1", "test_f1"]
    lines = ["| " + " | ".join(cols) + " |", "|" + "---|" * len(cols)]
    for _, r in df.iterrows():
        cells = [r.run, r.role, f"{r.val_f1:.3f}", "-" if pd.isna(r.test_f1) else f"{r.test_f1:.3f}"]
        if r.role == bold_role:
            cells = [f"**{c}**" for c in cells]
        lines.append("| " + " | ".join(cells) + " |")
    return "\n".join(lines)

print(markdown_table(log))
print("\nTest set used once, for the chosen model only.")
| run | role | val_f1 | test_f1 |
|---|---|---|---|
| DummyClassifier | baseline | 0.000 | - |
| LogisticRegression | simple | 0.701 | - |
| **RandomForestClassifier** | **chosen** | **0.812** | **0.828** |
| HistGradientBoosting | candidate | 0.805 | - |

Test set used once, for the chosen model only.

The table shows what a reviewer wants in one glance: the baseline, the model chosen on validation, and a single test number. The empty test cells are a feature: they prove the other candidates were never compared on the test set. (The log values here are typed in for the example; in a project they are read from reports/experiments.csv.)

The model card

A model card is a short, standard description of a model for the people who will use or audit it (governance, model registry). For a portfolio project, half a page is enough:

text
MODEL CARD: house-price estimator v1.2                                  2026-11-22
Intended use     first estimate of a listing price for agents in one city; not for mortgages or tax
Not for          other cities, commercial property, houses above the training price range
Training data    generated sales 2019-2023 (synthetic; seed 0), 4,000 rows, see data/README.md
Evaluation       trained on 2019-2022, tested once on 2023 (800 sales)
Metrics          MAE 14,900 (95 % bootstrap 13,800-16,100); 80 % interval coverage 0.79
Slices           error by district and price band in reports/slices.csv; worst: newest district
Limitations      synthetic data; no inflation after 2023; sparse above the 95th percentile
Ethics           no personal data; prices can encode past neighbourhood discrimination
Maintenance      retrain yearly, or when monthly MAE exceeds 20,000 (monitor in serve.py)

(The numbers in this card are an illustration of the format, not results from project 1.)

The one-page summary

For a manager, a client or an interviewer without time for the repository, write one page: the problem in one sentence; the result as a decision ("flagging the top 200 payments a day would catch 64 % of fraud, against 31 % for the current rule"); the evidence in three bullets (baseline, test protocol, worst slice); the risks and what would be needed before going live; and one figure, usually the metric that matters against the baseline. Avoid "accuracy 97 %" without context; translate the metric into the user's unit (money, hours, cases found).

Choosing what to show

Three or four well-documented projects beat fifteen half-finished ones. A balanced portfolio from this course could be: one tabular project with a careful time split and prediction intervals (project 1 or 7), one imbalanced decision problem with a cost-based threshold (project 6), one deep-learning project with transfer learning and an error analysis (project 9, 10 or 13), and the platform or your own capstone to show the whole lifecycle (project 15 or the mini project). Change at least one thing in each, a different data set, an extension from the project's list or a new error analysis, so that it is your work and not a copy of a lesson.

When you use public data in a portfolio, keep to its licence and say what it is; never publish personal data, even "anonymised" (privacy, consent and licensing).

Practice

  1. A README says "accuracy 0.96". What three facts would you ask for before believing it is good?
Answer

The baseline on the same data (for example the majority-class rate: if 95 % of rows are negative, 0.96 is barely better than doing nothing); how the test set was built and used (split type, size, whether it was used once and whether preprocessing was fitted on training data only); and a metric that matches the goal, with its uncertainty (recall or precision for the class that matters, with an interval).

  1. In the bootstrap example, the interval for 100 test rows is about 0.28 wide. Roughly how wide would you expect it for 1,600 rows, and why?
Answer

The width shrinks roughly like 1/n1/\sqrt{n}: 400 rows gave 0.149, so 1,600 rows (four times as many) should give about half of that, around 0.075. You can check it by generating a larger data set and rerunning the example.

Test yourself

In the README table, why are the test cells of the other candidates empty?

  1. They crashed
  2. Only the model chosen on validation was evaluated on the test set, once
  3. The test set was too small
  4. Markdown tables cannot hold more numbers

The headline result is F1 0.828 with a 95 % bootstrap interval of 0.747-0.896. A new model scores 0.850 on the same test set. What can you conclude?

  1. The new model is clearly better
  2. The difference is well inside the uncertainty; the test set cannot tell the two apart
  3. The old model is better
  4. The interval is wrong

Where should the numbers in a project's README come from?

  1. Typed in by the author after the last run
  2. From files the evaluation code wrote, such as reports/metrics.json
  3. From the best run ever seen
  4. From the validation set only