AI 101 - Building Supervised ML Models

Welcome to this hands-on machine learning lab!

In this lab you will

  • Work with real-world email spam data
  • Build your own Transformer-based NLP model
  • Train a classifier using deep learning
  • Evaluate the performance of your model
  • Understand each step of the ML pipeline
  • Run live inference on user-provided text inputs

What This Lab Covers—and What It Does Not

  • This lab focuses on supervised machine learning.
  • The model produces deterministic predictions.
  • The objective is classification accuracy, not text generation.
  • Generative models and LLMs are covered in a separate advanced lab.

Learning Goals

By the end of this lab you will be able to:

  • Explain how text datasets are prepared for machine learning
  • Vectorize and tokenize text inputs
  • Implement a Transformer encoder block
  • Train a binary classification model
  • Understand accuracy, AUC, confusion matrices
  • Save and reload ML models
  • Use a model for real-world predictions