Welcome to ECS171 — Introduction to Machine Learning!

This course is designed to give you a solid foundation of the basic concepts of machine learning that you can build on later. We emphasize hands-on learning, with practicals and group based projects with theory and individual written traditional tests.

Course Staff

NameRoleEmailOffice Hours
Gabriel SimmonsInstructorgsimmons at ucdavis.edu2-3pm Thursdays 3052 Kemper; No office hours 1/9/25 due to travel
Ziwen KanTAzkan at ucdavis.edu4-5 pm Tuesdays 55 Kemper Extra OH for Midterm Review Wed, Feb 5th 9 AM - 10 PM on Kemper 55
Trevor ChanTAtchchan at ucdavis.edu4-5 pm Fridays 55 Kemper; Extra OH for Midterm Review Thursday, Feb 6th 11 AM - 12 PM on Google Meet
Claudio SpiessTAcvspiess at ucdavis.edu1-2 PM Wednesdays 53 Kemper; Extra OH for Midterm Review Wed, Feb 5th 11 AM - 12 PM on Zoom

Course Goals

This course is aimed at developing practical machine learning and data science skills. We take a data-centric view of the application of machine learning, emphasizing validation and critical assessment of the ML model. The course will cover theoretical basics of broad range of machine learning concepts and methods with practical applications to sample datasets via programming assignments.

Upon completion of this course you will have acquired the following knowledge:

  • Understand the key concepts in machine learning, a critical precursor to effective collaborations in industry or academia. Towards this aim, students will:

    • Characterize the process to train and test machine learning algorithms
    • Critique core and cutting edge machine learning algorithms
    • Identify the challenges for designing modern machine learning systems that can harness today’s “big” datasets
    • Recognize ways to evaluate the predictive power of machine learning systems
    • Compare the assumption made in each model and the strengths and weakness of each model.
  • Apply machine learning systems to perform various artificial intelligence tasks. Towards this aim, students will:

    • Experiment with machine learning libraries, including scikit-learn and TensorFlow
    • Evaluate machine learning algorithms for tasks in various application domains, including for analyzing text and analyzing images
  • Conduct and communicate original research. Towards this aim, students will:

    • Propose a novel research idea (this will be an iterative process)
    • Design and execute experiments to support the proposed idea
    • Write a research paper about the project
    • Present the project to the class

Prerequisites

  • Programming (ECS 032B or ECS 036C); Statistics (STA 032 or STA 131A or ECS 132); Algebra (MAT 022A or MAT 027A);
  • You are expected to know how to program in Python. Some exercises will be conducted in Python using Jupyter Notebooks.
  • You expected to know or learn how to use a Python package manager such as uv or conda to install versions of the Python interpreter and third-party libraries from PyPI.
  • You are expected to have basic familiarity with git and Github. Course assignments will be submitted via Gradescope.

Attendance

  • ECS171 is in-person and attendance is mandatory
  • Failing to attend midterm and final exams will give zero marks
  • Course Meeting Times and materials: consult UC Davis Schedule Builder
  • Lectures and discussions are in-person

Resources

  • Lecture slides, reading materials, and homework assignments will be uploaded to this site.
  • Lecture videos will be recorded and posted to Canvas, as long as the room supports lecture recording

Course Schedule

Odd-numbered discussions will be presented during the 3-4pm TA-led discussion sections. Even-numbered discussions will be presented during the 12-1:30 lecture time. On a typical week, this means that half of the Thursday lecture will be dedicated to the even-numbered discussion for that week.

ClassDateTopicRecommended ReadingDeadlines/Notes
Week 1
L1Jan 7Introduction to ECS171B 1.1, R 1-7
D1Jan 7 & 9Tutorial on Jupyter Notebooks
L2Jan 9Introduction to Machine Learning: data, models, and hypothesesR 1-7, R 3.4.6
D2Jan 14 (during lecture)Exploratory Data Analysis Discussion 2 Materials
D1bJan 9Tutorial on Jupyter Notebook and GitHubHW 1 released, Discussion 1 Recording
Week 2
L3Jan 14 Validation of hypotheses: regression B 3.1, R 1-7, R 3.4.6 & note see also Lecture 8 here
D3Jan 14 & 16HW1 reviewDiscussion 3 Recording
L4Jan 16Optimization and generalization of models
D4Jan 16 (study at home)Polynomial regressor using gradient descent coding exampleDiscussion 4 Materials
Jan 17HW1 due
Week 3
L5Jan 21Optimization and regularizationB: p. 179-195 & [note]
D5Jan 21 & 23HW2 reviewDiscussion 3 Recording, Thu Recording
L6Jan 23Supervised Classifiers I
D6Jan 23 (during lecture)Building a logistic regression, Newton’s method: Activity 1
Jan 24A1 due
Week 4
L7Jan 28Supervised Classifiers II
D7Jan 28 & 30A hands-on practice for different activation functionsThu Discussion Notes
L8Jan 30Artificial Neural Networks I
D8Jan 30 (during lecture)ANN optimization and generalizationHW3 released
Jan 31HW2 due
Week 5
L9Feb 4Artificial Neural Networks performance and tuning II
D9Feb 4 & 6HW3 review and Midterm review
L10Feb 6Probabilistic methods
D10Feb 6 (during lecture)ANN with back-propagation and termination criteria
Feb 7A2 due
Week 6
ExamFeb 11Midterm Exam (covers L1-L9)Midterm Exam
D11Feb 11 & 13Post-midterm review
L11Feb 13Probabilistic methods II
D12Feb 13 (during lecture)Support vector machinesHW3 due
Feb 14
Week 7
L12Feb 18Support vector machines
D13Feb 18 & 20Probabilistic Models (Naive Bayes)
L13Feb 20Decision Trees and Principal Component Analysis
D14Feb 20 (during lecture)Decision Trees practice
Week 8
L14Feb 25Unsupervised Learning IHW4 Released
D15Feb 25 & 27Random Forest examples
  • Discussion Slides
  • Tue Recording
  • Thu Recording
  • Decision Tree Notebook
  • L15Feb 27Unsupervised Learning II
    D16Feb 27 (during lecture)HW4 discussion
    Feb 28A3 Released
    Week 9
    L16Mar 4Unsupervised Learning III
    D17Mar 4 & 6Final exam review
    L17Mar 6Reinforcement Learning
    D18Mar 6 (during lecture)Ethics in ML discussion
    Mar 7
    Week 10
    Mar 10Project Slides due; HW4 due
    ProjectsMar 11Project Presentations and Demos
    ProjectsMar 13Project Presentations and DemosProject Reports due
    Finals Week
    ProjectsMar 18Study Session Recording
    ExamPlease check Schedule Builder for the final exam date and time. Unless otherwise indicated, the final is in the same room as lecture.Final Exam (covers L10-L17)Final Exam

    B is Bishop (2006) and R is Rafatirad et al. (2022), ‘note’ in table is external link to further reading

    This class relies heavily on the following topics:

    • Probability Theory and Statistics (ECS132 at UCD)
    • Linear Algebra (MAT22A at UCD)
    • Calculus (MAT21 series at UCD, especially the vector calculus elements of MAT21C)

    Many students who take this class are rusty in one or more of these areas. Assess yourself with this brief quiz:

    Prerequisites Quiz
    1. What is the definition for the gradient of a multivariable function?

    2. Calculate given , where and are 2x1 column vectors.

    3. Given a discrete probability distribution , write the formula for the expected value of as a summation.

    4. Write the expression for the partial derivative of with respect to :

    1. What is the role of a -value in Null Hypothesis Significance Testing? What does the value of represent? How do we interpret it?

    If you don’t feel confident about your answers, don’t be alarmed! This just means you should refresh your understanding of the topics above.

    Where should you study?

    • Chapter 2 (Linear Algebra) and 3 (Probability and Information Theory) of Deep Learning by Goodfellow, Courville, and Bengio (free online)
    • Thomas’ Calculus: Early Transcendentals
      • This is the textbook for calculus in the 21 series at UCD
      • older editions can be found online
      • we will use content from sections 3.1-4, 3.6, 4.1-3, 4.6, 10.7, 10.8, 12.1-12.5, and 14.1-14.7.
        • These section numbers are taken from the 13th edition. Newer editions may vary slightly.
    • more soon.

    Is it too late? NO. If you are rusty, a few hours a week in the first weeks of class will pay off.

    B: Bishop, 2006, Pattern Recognition and Machine Learning, PDF available

    R: Rafatirad et al., 2022, Machine Learning for Computer Scientists and Data Analysts, PDF available

    ‘Note’ in table is external link

    Additional Resources for Further Study

    Free online courses for further study include:

    Grading

    GroupAssignmentAssignment Percent of Final GradeGroup Percent of Final Grade
    HomeworkHomework 13.75%
    HomeworkHomework 23.75%
    HomeworkHomework 33.75%
    HomeworkHomework 43.75%
    Homework15%
    Class ActivitiesActivity 11.25%
    Class ActivitiesActivity 21.25%
    Class ActivitiesActivity 31.25%
    Class ActivitiesActivity 41.25%
    Class Activities5%
    ProjectProject Group Signup0.5%
    ProjectProject Collaboration Survey 10.5%
    ProjectProject Collaboration Survey 20.5%
    ProjectProject Proposal2.5%
    ProjectProject Presentation5%
    ProjectProject Report and Code6%
    Project15%
    Midterm ExamMidterm Exam30%30%
    Final ExamFinal Exam35%35%
    Total100%100%

    Exams

    • Exams are in-person and missing an exam is equivalent to 0 credit
    • Exams are non-cumulative
    • Exam location for the midterm is the same as the lecture room, unless otherwise announced on Canvas.
    • Exam location for the final is the same as the lecture room, unless otherwise announced on Canvas. Please refer to Schedule Builder for the final exam date and time.

    Assignments

    • Please see the UC Davis Academic calendar for the course drop date.
    • Please see the Course Schedule above for assignment deadlines.
    • One (1) lowest homework grade will be dropped at the end of the quarter.

    Late Assignment Scoring

    Homeworks, Activities, and Collaboration Surveys will be accepted up to 2 days (48 hours) after the posted deadline. When an assignment is submitted late, the final score is calculated by first grading the assignment normally, then applying a late penalty that increases linearly over time, up to 2 days late.

    Formula

    For an assignment submitted d days late (where 0 ≤ d ≤ 2):

    Examples

    • If you score 90% on the assignment and submit 1 day late:
      • Final Score = 90% × (1 - 1/2) = 45%
    • If you score 80% on the assignment and submit 1.5 days late:
      • Final Score = 80% × (1 - 1.5/2) = 20%
    • If you submit more than 2 days late:
      • Final Score = 0% (regardless of original score)

    Note: Partial days are counted proportionally. For example, submitting 12 hours late would count as 0.5 days (d = 0.5).

    Assignment Submission Guidelines

    • Provide your full name and student email
    • Submit your homework as one single PDF export of your Jupyter Notebook, with code and output cells clearly visible
    • Provide your answer below each question in each assignment
    • Comment and document your code to explain your approach.

    Group Project

    The learning outcome from the group project is for you to conduct and communicate original research as a group. This is similar to a setting you might encounter in industry or academia. The project deliverable includes writing a research paper, sharing experimental results on Github, and presenting the project outcome in class by developing an interface to call your model.

    The objective of the group project is for you to:

    • Develop skills in working as a group and collaborating
    • Learn how to develop a product according to project specifications
    • Learn how to deliver assigned tasks before the deadline and time management
    • Acquire the skill set to research a topic and learn from other techniques and recreate your solution
    • Have a hands-on experience to improve your machine learning skill set
    • Everybody is expected to work as a group! Credit will not be given to members who fail to sufficiently communicate, participate and contribute to the deliverables

    Group Project Organization

    • Student groups will be announced (see the course schedule), with a max size of five students.
    • As a group, pick a project and get the instructor’s approval on the topic.

    Group Project Submission Guidelines

    • For the group project: Include the name of your group in the project’s final submission.
    • Provide your full name and student email
    • Submit your homework as one single .ipynb file (Jupyter Notebook)
    • Provide your answer below each question in each assignment
    • Comment and document your code to explain your approach.

    Group Project Requirements

    1. Pick a topic and consult with your professor if needed (make an appointment and attend Office Hour)

    2. Prepare a 1-page write-up explaining the goal of the project and deliverables to be approved by the instructor

    3. Create an action plan and a scheduled road-map to meet the goals. This road-map must be submitted with your report at the end of the quarter. The road-map should address the following:

      • Describing the problem scientifically
      • Background study (literature review or related work)
      • Dataset: Understanding and Exploratory Data Analysis
      • Developing Accurate Prediction Model(s)
      • Evaluation of the model(s) and Testing the performance
      • Developing a basic web-based front-end to invoke and run the model(s) on input data and display the prediction output
    4. Project report format requirements:

      • 1 column, single space, 11 pt. font
      • Written in LaTeX
      • Submit as one PDF file
      • 6-8 pages excluding references
      • Sections:
        • Outline
        • Introduction (1 page)
        • Literature review (1 page)
        • Dataset Description (1/2 page)
        • Proposed solution and experimental results (4-5 pages)
        • Conclusion and discussion (1/2 page)
        • References (no limit)
        • One page for the project roadmap
      • Suggestion: about 5 pages of text and 4-5 figures in position, or at the end of the document
    5. Include the Github link to the source code of your project in your final report

    6. Submit the final report including all required material as one PDF file

    Hints for a Great Final Report

    1. Include visualizations, tables, and plots in your report to show trends and report the performance and training of the model

    2. Reference figures properly in the report

    3. In the related work section (or background/literature review):

      • Review related published papers with methodology which may help or inspire your research project
      • Consider discussing their datasets and selection of techniques
      • Indicate how your work differs from these past works
    4. Include your findings in the conclusion section

    5. Read my article on Adding Substance to Machine Learning Projects