About this course

Who teaches it, and how the site is put together

The instructor

Prof. Dr. Zahid Asghar is Professor, Ex-Director of the School of Economics at Quaid-i-Azam University, Islamabad, and Professor of Statistics and Econometrics. His work spans applied econometrics, development economics, and the modernisation of official statistics in Pakistan.

He sits on the Research Advisory Committee of PIDE’s RASTA Competitive Grants Programme, and writes regularly for the Money Matters section of The News. Much of his teaching, including this course, is built in R and Quarto and released openly.

zahidasghar.com · GitHub · LinkedIn

What this site is

A single home for a course that had accumulated in two places: an R repository built up over a decade of teaching from An Introduction to Statistical Learning, and a newer Python repository holding the scikit-learn labs. Both are now here, organised by chapter rather than by language, so that a student following either track reaches the same material.

The organising principle is that every topic gets a lecture, an R lab and a Python lab, and the chapter page holds all three. Where a lab has been rendered previously with its output intact, that rendered version is linked too, so the results are readable without running anything.

How it is built

The site is a Quarto website. Source lives in github.com/Zahedasghar/machine_learning and the rendered output is published from the docs/ folder via GitHub Pages.

To build it yourself:

git clone https://github.com/Zahedasghar/machine_learning.git
cd machine_learning
quarto render
quarto preview   # live reload while editing

The chapter pages are plain prose and contain no executed code, so quarto render builds in seconds and needs neither R nor Python. The labs are shipped as source and rendered on demand, which keeps the build reliable and the repository light.

Repository layout

Folder Contents
chapters/ One page per topic, with R and Python tabs
materials/ Flat indexes: labs, slides, readings, data, assessment
labs/r/, labs/python/, labs/notebooks/ Lab source, by language
slides/pptx/, slides/qmd/ Lecture decks
readings/ Handouts, chapter notes, supporting papers
exams/ Papers, question banks, solutions
data/ Datasets used by the labs
prerendered/ Previously rendered labs, with output intact
assets/ Theme SCSS and images
_archive/ Earlier project work kept out of the site

Reuse

Course material here may be used and adapted for teaching with attribution. The textbook itself belongs to its authors and is freely available at statlearning.com.

Corrections

Errors are likely and reports are welcome. Open an issue on the repository, or say so in class.

Back to top