ECE 365: Fundamentals of Machine Learning (Labs and Quizzes)

Topic Lab Due (All US Central Time)
Week 1 Introduction to Python [link] Not graded (Solution here)
Week 2 Classification, Part 1 [link] Sep 8th 11:59 pm CT
Week 3 Classification, Part 2 [link] Sep 15th 11:59 pm CT
Week 4 Linear Regression and Clustering [link] Sep 22th 11:59 pm CT
Week 5 Principal Component Analysis [link] Sep 29th 11:59 pm CT


You will have two quizzes. The first quiz covers material from Lectures 1 to 5. The second quiz covers material from Lectures 6 to 10. The quizzes are closed-book and closed-notes. Electronic devices (calculators, cellphones, pagers, laptops, headphones, etc.) are neither necessary nor permitted.

The quizzes will conducted in person in ECEB 2013 with the following schedule:

  • Quiz 1: Wednesday Sep 8, 8:00 - 8:40 PM.

  • Quiz 2: Monday Sep 27, 8:00 - 8:40 PM.

  • The quizzes from the last semester (with their solutions) are: Quiz 1 Spring 2021 and Quiz 2 Spring 2021.

Lab Submission

  • Gradescope entry code is N843KK. Please change your gradescope Student ID to your University UIN.

  • You will be provided with a template Python script ( for each lab where you need to implement the provided functions as needed for each question. Follow the instructions provided in the Jupyter Notebook (.ipynb) to implement the required functions. Do not change the file name or the function headers!

  • Upload only your Python script (.py file) on Gradescope. Don't upload your datasets or Jupyter Notebook (.ipynb file). We have provided an example solution for Lab 1 above. You will similarly submit your .py file for each future lab.

  • Your grades and feedbacks will appear on Gradescope. The grading for the programming questions is automated using Gradescope autograder, no partial credits are given. Therefore, if you wish, you will have a chance to re-submit your code within 72 hours of receiving your first grade for the corresponding lab, only if you have reasonable submissions before the deadline (i.e. not an empty script).

  • You can submit for any times you want before the deadline. After the deadline, you will see a re-submission assignment open on Gradescope, and you can still submit multiple times to that re-submission assignment within 72 hours. If you re-submit after the deadline, the final grade for the programming part of this lab will be calculated as max{first_grade, .4 * first_grade + .6 * .9 * re-submission_grade}.

  • Each lab will also have Multiple Choice Questions (MCQs) that are needed to be completed on Gradescope within the deadline.

Lab 1


  • Exercises 5 and 6 will be building blocks for the first problem in Lab 2 (where you can use part (a) or part (b) of both exercises). You should be able to do part (a) of both exercises in a straightforward manner. As stated in the lab, part (b) is optional, but good to know. If you're stuck on part (b), make sure to write out the matrices and you should be able to construct the appropriate matrix multiplication. If you do not solve part (b), do not worry about it. But, you really should solve part (a) of both Exercises 5 and 6.

  • A better hint for Exercise 6(b) might be: “You can do this with the, element-wise multiplication and np.sum (along an axis) operations.”

    Please follow the Python instructions to get started with Jupyter notebooks. You should not need to install any additional packages for this portion of the course if you have installed Anaconda or Canopy.

    The following other Python tutorials may be helpful:

  • Elegant Scipy: The Art of Scientific Python, by Juan Nunez-Iglesias, Stefan van der Walt, Harriet Dashnow (Highly Recommended)

  • Software Carpentry (Highly Recommended)


  • Official Python Documentation

  • Learn Python the Hard Way

  • NumPy Quickstart (Highly Recommended)

  • NumPy for MATLAB Users

  • IPython Notebooks

  • High Performance Scientific Computing AMath 483/583, Spring 2011 at U. Washington

    And a few links to write code concisely:

  • List Comprehensions

  • Code Vectorization (in Matlab; the ideas translate to Python in a straighforward manner)