Python across the MSc courses#
Python is a shared research tool across the programme rather than a topic that belongs to only one course. The same language constructs reappear in different scientific settings.
This workshop primarily prepares you for three courses:
Advanced Cognitive Neuroscience (ACN), where Python supports loading, organising, transforming, averaging, and visualising multidimensional neuroscience data.
Natural Language Processing (NLP), where Python is used to represent text, build processing pipelines, create numeric features, and interact with machine-learning models.
Data Science, Prediction and Forecasting, where Python supports tabular data analysis, statistical learning, model evaluation, and reproducible prediction workflows.
Advanced Cognitive Neuroscience#
Typical tasks include handling participant files, understanding library objects, working with epochs, averaging signals, and plotting results.
Foundation |
Why it matters in ACN |
|---|---|
|
Locate participant, condition, and recording files safely |
Environments |
Install compatible versions of neuroscience packages |
Objects and classes |
Read APIs in which recordings, epochs, and results are objects |
Dictionaries |
Store metadata, parameters, event mappings, and channel information |
NumPy arrays |
Represent data such as trials × channels × time |
Axes and aggregation |
Understand epoching, baseline correction, and evoked responses |
Matplotlib |
Inspect signals and communicate comparisons |
The most important mental habit is to annotate every array dimension with its scientific meaning.
Natural Language Processing#
Typical tasks include cleaning text, tokenisation, corpus exploration, vectorisation, and using learned representations.
Foundation |
Why it matters in NLP |
|---|---|
Strings and lists |
Represent documents, sentences, and tokens |
Dictionaries |
Represent documents, labels, vocabularies, and model inputs |
Loops and comprehensions |
Transform collections of documents |
Functions |
Make preprocessing steps reusable and testable |
pandas |
Explore corpora and metadata |
Arrays and tensors |
Represent documents × features or batch × tokens × embeddings |
Objects and methods |
Use vectorisers, tokenisers, pipelines, and models |
An NLP pipeline often begins with text and ends with numbers. At every step, ask what was preserved, removed, or encoded.
Data Science, Prediction and Forecasting#
The course covers statistical learning, regression, classification, resampling, regularisation, non-linear models, trees, support vector machines, and deep learning. Python is the working language that connects the data to those ideas.
Foundation |
Why it matters in Data Science |
|---|---|
pandas |
Clean, join, summarise, and inspect tabular data |
NumPy |
Understand numeric representations and dimensions |
Functions |
Build repeatable transformations and evaluation procedures |
Objects and methods |
Read the common |
Boolean logic |
Filter observations and define conditions correctly |
Environments and seeds |
Make analyses reproducible |
Visualisation |
Diagnose data and communicate model behaviour |
The central data structure is usually a feature matrix X with shape samples × features, accompanied by a target y.
What this workshop covers#
The two days progress from language fundamentals to research workflows:
values and types
↓
collections and control flow
↓
functions, objects, and files
↓
arrays, tables, and visualisation
↓
reproducible analysis and model workflows
You are not expected to memorise every method. You are expected to know how to inspect an object, consult documentation, test an assumption, and explain what your code does.