EE212 Mathematical Foundations for Machine Learning and Data Science

Summer 2020

Department of Electrical Engineering
Syed Babar Ali School of Science and Engineering
Lahore University of Management Sciences.

Course Overview

Machine Learning and Data Science are being used these days in a variety of applications including, but not limited to, forecasting in economics and finance, predicting anomalies or signal analysis in engineering, identification of speaker in acoustics, detection of cosmic bubbles in astrophysics and diagnosis in medical imaging.

While machine learning and data science have enabled many success stories, and tools are readily available to analyse data or design machine learning systems, the strong mathematical foundations in these areas are of significant importance to understand, review, analyse and evaluate the technical details of the machine learning systems and data science algorithms that are usually abstracted away from the user. This course focuses on the mathematical foundations that are essential to build an intuitive understanding of the concepts related to Machine Learning and Data Science.

Topics covered are

  • Linear Algebra: vectors and matrices, vector spaces, system of linear equations, eigen-value decomposition, singular value decomposition, regression, least-squares, regularization

  • Calculus: Multivariate calculus and differentials for optimization, gradient descent

  • Probability: probability axioms, Bayes rule, random variable, probability distributions

  • Statistics: descriptive stats, inferential stats, statistical tests

  • Introduction to Neural Networks: single and multi-layer perceptron(s), feedforward and feedback networks

  • Application to machine learning and data science: principal component analysis (PCA), time series forecasting, clustering etc

  • Hands-on exercises: Implementation of the exercises will be carried out in Python

Course Overview


  • (Jun. 19) Course overview video available here.

  • (May. 13) Welcome to EE212. Course outline has been posted.

Administrative Details

  • Course Outline (Click to download)

  • Suggested Books:

    • M. P. Deisenroth, A. A. Faisal and Cheng Soon Ong. Mathematics for Machine Learning. Cambridge University Press, 2019

    • S.Boyd and L. Vandenberghe. Introduction to Applied Linear Algebra - Vectors, Matrices, and Least Squares. Cambridge University Press, 2019

    • G. Strang. Introduction to Linear Algebra. 2016

  • Office Hours and Contact Information

    • Instructor: Zubair Khalid (

    • Lead Teaching Assistant: Muhammad Salaar Arif Khan (

    • Teaching Assistant: Hamza Athar (

    • Teaching Assistant: Rabeeyah Hamid (

    • Teaching Assistant: Muhammad Huzaifa Khan Suri (

Grading Distribution

  • Assignments, 20 %

  • Programming Assignments, 10 %

  • Quizzes, 10 %

  • Mid-Exam, 20 %

  • Mid-Viva, 10 %

  • Final Exam, 20 %

  • Final Viva, 10 %

Lecture Notes and Exams

Lecture notes, past exams and reading assignmnets will be posted here.



Lab Exercises


Quiz Solutions
Quiz 01 Solutions
Quiz 02 Solutions
Quiz 03 Solutions
Quiz 04 Solutions
Quiz 05 Solutions

Lecture Plan

  • Lecture 01

    • Course Introduction

    • Fundamental concepts

Online Modules