This is a 3-hour in-class challenge where teams of up to 2 students will build an end-to-end pipeline that combines Natural Language Processing with a Machine-Learning classifier to predict the political orientation (e.g., left, centre, right) of news articles.
The deliverable is a working model, a performance evaluation, and reproducible code.
| Phase | Duration | What Happens | Deliverables |
|---|---|---|---|
| In-class challenge | 3 hours (during class) | Instructors available for hints. Explore data, set up a baseline, iterate on models. | A runnable prototype (script or notebook) that trains a model and outputs predictions on a validation split. |
| Immediate check-in | ≈ 15 min before the challenge ends | Each group announces the best-performing model discovered (validation accuracy/F1). Brief discussion of challenges and next steps. | One-sentence summary of the top model and its metric. |
| Post-class refinement | 48 hours (deadline: TBD) | Continue training, fine-tune hyper-parameters, conduct error analysis, improve reproducibility. No further instructor input is allowed. | Fully committed GitHub repository (see below) with a notebook that follows the good-practice guidelines. |
data/ – sample training/validation CSV filessrc/ – starter scripts for data loading, preprocessing, and a baseline modelrequirements.txt – required Python packages (scikit-learn, transformers, pandas, …)README.md – template with sections for description, setup, results, and usageTo ensure that the submitted notebook can be executed by anyone (instructor, future students, or yourself weeks later), follow these conventions:
1. Reproducibility
np.random.seed(42); torch.manual_seed(42))pip freeze > requirements.txt)model_v1.pkl)2. Run From Start to Finish
3. Comments & Documentation
# comment) in code cells for non-obvious lines4. Clear Cell Structure
# Section) in code cells to mirror the logical flow (e.g., # 1. Data Loading)requirements.txt, and the final README.md to the main branch of your GitHub Classroom repo.v1.0-final to help instructors locate the correct version.sklearn.pipeline.Pipeline objects or separate functions — this simplifies later refinements.