Page 8 of 8~104 min topic

Prediction: your first ML idea

Ship checklist for your mini prediction game

Mastery means you can hand someone the toy, the evidence, and the limits — without turning five rounds into a fake product claim.

~13 min this pageMastery and shipping

1Learn the idea

Read

The mastery ship note

Your ship package is small on purpose:

  • the working path,
  • the expected evidence line,
  • proved vs unproved,
  • privacy + honesty gates,
  • how to reproduce a rules bug.

Here is the artifact you can still run live:

truth = [1, 0, 1, 1, 0]
scores = [0.8, 0.3, 0.6, 0.9, 0.2]
threshold = 0.5
preds = [int(score >= threshold) for score in scores]

pairs = list(zip(truth, preds))
tp = pairs.count((1, 1)); fp = pairs.count((0, 1))
tn = pairs.count((0, 0)); fn = pairs.count((1, 0))
accuracy = (tp + tn) / len(pairs)
print(preds, f"accuracy={accuracy:.2f}", tp, fp, tn, fn)

Expected evidence:

[1, 0, 1, 1, 0] accuracy=1.00 3 0 2 0

Read

Checklist before you share

  1. Happy path — print matches the expected line on two runs.
  2. Validation — TP+FP+TN+FN = 5; accuracy matches hand count.
  3. Failure handling — empty lists and mismatched lengths fail loudly.
  4. Observability — a friend can read threshold, preds, and buckets from the output.
  5. Safe demo rules — no real classmate messages; don’t claim the toy works on all phones.
  6. Proved vs unproved — proved: exact scoreboard on five practice rounds; unproved: real-world spam/shot performance everywhere.

Read

Explain limits without apology

Limits are part of the craft. Saying “n=5 fixture only” is stronger than a vague “it’s just a demo lol,” because it tells the next person what evidence exists. School projects that write proved/unproved earn more trust than projects that only show a perfect accuracy sticker.

Read

What “ship” means for a classroom toy

Shipping here means: the notebook runs, the evidence is pasteable, the safe demo rules are visible, and a partner can reproduce both the healthy path and one game bug. It does not mean uploading to every phone, connecting to a real school inbox, or promising accuracy outside the fixture.

When you present, lead with the decision the toy supports (“choose a cutoff and see error buckets”), then show the printout, then read the unproved line. That order stops the audience from hearing only “accuracy=1.00” and walking away with the wrong story. Keep the four kid metaphors handy: TP = correct yes, FP = false alarm, TN = correct no, FN = missed yes.

Go deeper

Before you start

Why this matters

Fill a sticky note before you “ship” to the club channel: Proved:Unproved:Safe demo rules: … If any blank feels hard, you are not ready to present yet.

Check your understanding

Page assessment

Answer from memory. Completion is saved from this evidence, not from opening the next page.

1. Can you show the expected evidence on demand?
2. Is proved vs unproved written without overclaiming?
3. Are privacy and honesty gates explicit?
4. Could a classmate reproduce a length-mismatch bug and the healthy path?

All responses are required.