Notebooks#
Open the repository in VS Code and select the workshop environment before running a notebook. Use Shift+Enter to run a cell.
Notebook 0: Python warm-up#
Lists, dictionaries, comprehensions, functions, debugging, and short written answers.
Open Notebook 0 in the book
Notebook 1: Lexical decision data#
Analyse trial-level reaction times and accuracy from a lexical-decision experiment.
Notebook 2: EEG arrays#
Move between pandas and NumPy, select samples with Boolean masks, calculate channel means, and practise reshaping arrays.
Notebook 3: Model workflow#
Create participant-level features from lexical-decision trials, split at the participant level, fit a scikit-learn pipeline, and inspect the confusion matrix and leakage risks.
Open Notebook 3 in the book
Notebook 4: NLP text features#
Build a document–term matrix and TF–IDF representation, compare documents, and transfer NumPy axis reasoning to token embeddings.
Open Notebook 4 in the book
The checks compare selected values, shapes, or columns with expected results. Written interpretations are not checked automatically.
Solutions#
Try each exercise notebook first. When you need to compare your approach, use the matching completed notebook:
In the repository, all completed notebooks are grouped under notebooks/solutions/.
Data sources#
The EEG Eye State data was donated by Oliver Roesler and is distributed by the UCI Machine Learning Repository under CC BY 4.0 (DOI).
The lexical-decision data is distributed with the languageR package and described in Baayen’s Analyzing Linguistic Data: A Practical Introduction to Statistics (2008). The package is licensed under GPL (≥ 2).