Skip to content

1 · Train your first classifier

Machine learning sounds like magic until you’ve done it once. In the next hour you will: frame a prediction problem, train a real model on 900 learners’ data, test it on learners it has never seen — and then, in the ethics lab, measure whether your model treats disadvantaged learners fairly, and make the call professionals must always make: should this model be used?

You will build the model the careful way — deliberately withholding the sensitive attribute so it cannot discriminate. Then you will audit it and discover that this standard precaution did not work, and why.

⏳ The scikit-learn import takes a few extra seconds on first run — it’s a big library arriving in your browser.

The notebook above runs entirely in your browser — nothing is installed and nothing leaves your device. Your changes are kept in this browser. First load takes a few seconds while Python starts.

Open it full-screen ↗

  • Why must the test set stay unseen during training?
  • Your accuracy was ~66% — what would a useless baseline score? (Always predicting “passed” scores about 61%, so how much is the model adding?)
  • The model never saw has_own_laptop and still failed that group badly. Explain to a colleague why removing a sensitive column doesn’t create fairness.
  • It passed the four-fifths rule yet was wrong about nearly half the no-laptop learners. Why were both checks necessary?
  • The four-fifths rule is a US standard and EU law sets no threshold at all. So who decides what counts as too unfair here — and on what basis?
  • What did you write in your reflect_submit judgment — deploy, or not?

The ethics lab is the DataLab’s signature pattern: build it → measure it → name it → judge it. You didn’t just hear that models can discriminate — you measured your own model doing it, connected the finding to the EU AI Act, and put your judgment in writing. That judgment is saved to your DataLab portfolio, which the capstone exports as one file you can submit for a EURIDICE microcredential.

EURIDICE’s dedicated AI Ethics & Digital Humanism course goes deeper on all of it — bias, fairness metrics and their trade-offs, accountability, and the EU AI Act. Technical skill and ethical judgment are one competence, not two.

Next: Overfitting, and choosing a model — is a better model a fairer one?

Co-funded by the European Union

Co-funded by the European Union under the Digital Europe Programme — projectEURIDICE, Grant Agreement No. 101123121. Views and opinions expressed are those of the author(s) only and do not necessarily reflect those of the European Union or the European Commission. Neither the European Union nor the granting authority can be held responsible for them.
Built by IIIM — Icelandic Institute for Intelligent Machines. Learning materials are licensedCC BY 4.0.