Lab 1

Due: September 18, 2026 (9 points)

Part 1 is due Friday, September 11 at 11:59pm ET.

In Part 1 you will set up a local uv environment, load and explore the 20 Newsgroups corpus, and train and tune topic models on it.

Part 2 is due Friday, September 18 at 11:59pm ET.

In Part 2 you will download and parse the Folger Shakespeare corpus from its TEI XML source, vary what counts as a document (play, scene, speech, character), and compare the resulting topic models against 20 Newsgroups.

Starter notebooks

Part 1: lab1_pt1.py

Part 2: lab1_pt2.py

Required Deliverables

For Part 1, you will submit lab1_pt1_yourandrewid.py and model_history_yourandrewid.csv

For Part 2, you will submit lab1_pt2_yourandrewid.py and model_history_part2_yourandrewid.csv

The notebook appends every run to model_history.csv (Part 1) or model_history_part2.csv (Part 2) next to itself as soon as it finishes training. Please simply rename the file and submit it along with the notebook

uv run marimo edit for the browser interface (Clara does this), OR the marimo extension on VSCode (Sireesh does this)

Prohibited

Explicitly not required