Topic outline

    • SCMP111 Introduction to Python (August 2026)

      Teacher: Yuxin Chang
      Date: Tue., 18 Aug. 2026 - 12:00 pm
      Scientific Computing Credits: 4
    • Overview

      A three session workshop for engineering undergraduates and graduate students who are starting to use Python and machine learning in their research. The course builds from the ground up: first Python for scientific computing, then the machine learning workflow, then how to tell whether a model is actually any good.

      The emphasis is on understanding rather than on memorizing library calls. Several methods are written out by hand first, in plain NumPy, before the library version is shown, so you can see what the library is doing for you.

      All work runs in JupyterLab on the SciNet teach cluster. The dataset is real: body measurements of 344 penguins collected at Palmer Station, Antarctica.

      Syllabus

      Session 1: Python for Scientific Computing. Virtual environments and Jupyter kernels, core Python, the idioms real analysis code is written in, NumPy (vectorization, broadcasting, views versus copies, floating point), pandas, matplotlib, and turning a notebook into a command line script.

      Session 2: Machine Learning Workflow. What learning actually means, defining the problem, splitting the data before training, data leakage and why pipelines prevent it, k nearest neighbours (from the library and written from scratch), cross validation and grid search, and linear regression with least squares (again from the library and from scratch), with MAE, RMSE and R squared.

      Session 3: Model Complexity and Generalization. Why a model that fits the training data perfectly can still be useless, underfitting and overfitting, the bias and variance trade off, regularization, the difference between parameters and hyperparameters, and a practical workflow for diagnosing a model.

      Assignments

      Each session ends with a short assignment of about 20 to 30 minutes. The assignments are function stubs you complete inside the notebook, with a check cell that tells you whether your answers are right. A worked solution notebook is included in each session folder.