# Exercise: Spam or Not

Exercise: Spam or Not: Exercise: Spam or Not.

Updated: November 19, 2026

1. [Exercise: Spam or Not](https://www.ask-codey.com/lessons/exercise-ml-spam-or-not) (Journeyman): Write three functions that split Inbox Guard's 1,000 emails into training and test emails with the same share of spam in both, train a LogisticRegression on the training emails, and turn its chances of spam into labels at a threshold, and let pytest check the split, the model and the labels.

Source: https://www.ask-codey.com/courses/machine-learning-python/topics/exercise-ml-spam-or-not
