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
Name | Role | Office Hours | |
---|---|---|---|
Gabriel Simmons | Instructor | gsimmons at ucdavis.edu | 2-3pm Thursdays 3052 Kemper; No office hours 1/9/25 due to travel |
Ziwen Kan | TA | zkan at ucdavis.edu | 4-5 pm Tuesdays 55 Kemper Extra OH for Midterm Review Wed, Feb 5th 9 AM - 10 PM on Kemper 55 |
Trevor Chan | TA | tchchan at ucdavis.edu | 4-5 pm Fridays 55 Kemper; Extra OH for Midterm Review Thursday, Feb 6th 11 AM - 12 PM on Google Meet |
Claudio Spiess | TA | cvspiess at ucdavis.edu | 1-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.
Class | Date | Topic | Recommended Reading | Deadlines/Notes |
---|---|---|---|---|
Week 1 | ||||
L1 | Jan 7 | Introduction to ECS171 | B 1.1, R 1-7 |
|
D1 | Jan 7 & 9 | Tutorial on Jupyter Notebooks | ||
L2 | Jan 9 | Introduction to Machine Learning: data, models, and hypotheses | R 1-7, R 3.4.6 | |
D2 | Jan 14 (during lecture) | Exploratory Data Analysis | Discussion 2 Materials | |
D1b | Jan 9 | Tutorial on Jupyter Notebook and GitHub | HW 1 released, Discussion 1 Recording | |
Week 2 | ||||
L3 | Jan 14 | Validation of hypotheses: regression | B 3.1, R 1-7, R 3.4.6 & note see also Lecture 8 here | |
D3 | Jan 14 & 16 | HW1 review | Discussion 3 Recording | |
L4 | Jan 16 | Optimization and generalization of models | ||
D4 | Jan 16 (study at home) | Polynomial regressor using gradient descent coding example | Discussion 4 Materials | |
Jan 17 | HW1 due | |||
Week 3 | ||||
L5 | Jan 21 | Optimization and regularization | B: p. 179-195 & [note] | |
D5 | Jan 21 & 23 | HW2 review | Discussion 3 Recording, Thu Recording | |
L6 | Jan 23 | Supervised Classifiers I | ||
D6 | Jan 23 (during lecture) | Building a logistic regression, Newton’s method: Activity 1 | ||
Jan 24 | A1 due | |||
Week 4 | ||||
L7 | Jan 28 | Supervised Classifiers II | ||
D7 | Jan 28 & 30 | A hands-on practice for different activation functions | Thu Discussion Notes | |
L8 | Jan 30 | Artificial Neural Networks I | ||
D8 | Jan 30 (during lecture) | ANN optimization and generalization | HW3 released | |
Jan 31 | HW2 due | |||
Week 5 | ||||
L9 | Feb 4 | Artificial Neural Networks performance and tuning II | ||
D9 | Feb 4 & 6 | HW3 review and Midterm review | ||
L10 | Feb 6 | Probabilistic methods | ||
D10 | Feb 6 (during lecture) | ANN with back-propagation and termination criteria | ||
Feb 7 | A2 due | |||
Week 6 | ||||
Exam | Feb 11 | Midterm Exam (covers L1-L9) | Midterm Exam | |
D11 | Feb 11 & 13 | Post-midterm review | ||
L11 | Feb 13 | Probabilistic methods II | ||
D12 | Feb 13 (during lecture) | Support vector machines | HW3 due | |
Feb 14 | ||||
Week 7 | ||||
L12 | Feb 18 | Support vector machines | ||
D13 | Feb 18 & 20 | Probabilistic Models (Naive Bayes) | ||
L13 | Feb 20 | Decision Trees and Principal Component Analysis | ||
D14 | Feb 20 (during lecture) | Decision Trees practice | ||
Week 8 | ||||
L14 | Feb 25 | Unsupervised Learning I | HW4 Released | |
D15 | Feb 25 & 27 | Random Forest examples |
| |
L15 | Feb 27 | Unsupervised Learning II | ||
D16 | Feb 27 (during lecture) | HW4 discussion | ||
Feb 28 | A3 Released | |||
Week 9 | ||||
L16 | Mar 4 | Unsupervised Learning III | ||
D17 | Mar 4 & 6 | Final exam review | ||
L17 | Mar 6 | Reinforcement Learning | ||
D18 | Mar 6 (during lecture) | Ethics in ML discussion | ||
Mar 7 | ||||
Week 10 | ||||
Mar 10 | Project Slides due; HW4 due | |||
Projects | Mar 11 | Project Presentations and Demos | ||
Projects | Mar 13 | Project Presentations and Demos | Project Reports due | |
Finals Week | ||||
Projects | Mar 18 | Study Session | Recording | |
Exam | Please 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
Recommended Reading
Recommended Reading for Preparation/Prerequisites
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
-
What is the definition for the gradient of a multivariable function?
-
Calculate given , where and are 2x1 column vectors.
-
Given a discrete probability distribution , write the formula for the expected value of as a summation.
-
Write the expression for the partial derivative of with respect to :
- 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.
Recommended Reading During the Class
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
Group | Assignment | Assignment Percent of Final Grade | Group Percent of Final Grade |
---|---|---|---|
Homework | Homework 1 | 3.75% | |
Homework | Homework 2 | 3.75% | |
Homework | Homework 3 | 3.75% | |
Homework | Homework 4 | 3.75% | |
Homework | 15% | ||
Class Activities | Activity 1 | 1.25% | |
Class Activities | Activity 2 | 1.25% | |
Class Activities | Activity 3 | 1.25% | |
Class Activities | Activity 4 | 1.25% | |
Class Activities | 5% | ||
Project | Project Group Signup | 0.5% | |
Project | Project Collaboration Survey 1 | 0.5% | |
Project | Project Collaboration Survey 2 | 0.5% | |
Project | Project Proposal | 2.5% | |
Project | Project Presentation | 5% | |
Project | Project Report and Code | 6% | |
Project | 15% | ||
Midterm Exam | Midterm Exam | 30% | 30% |
Final Exam | Final Exam | 35% | 35% |
Total | 100% | 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
-
Pick a topic and consult with your professor if needed (make an appointment and attend Office Hour)
- Some Public Datasets:
-
Prepare a 1-page write-up explaining the goal of the project and deliverables to be approved by the instructor
-
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
-
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
-
Include the Github link to the source code of your project in your final report
-
Submit the final report including all required material as one PDF file
Hints for a Great Final Report
-
Include visualizations, tables, and plots in your report to show trends and report the performance and training of the model
- Figures need to have explanatory captions that explain the trend
- Plots should also be used during exploratory data analysis
- Helpful guide: A Gentle Introduction to Exploratory Data Analysis
-
Reference figures properly in the report
-
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
-
Include your findings in the conclusion section
-
Read my article on Adding Substance to Machine Learning Projects