1 of 19

EECS 189 Discussion 1

The Machine Learning Lifecycle

Ozan Bayiz, Fall 2026

2 of 19

The ML Lifecycle

3 of 19

The ML Lifecycle

Learning Problem: We frame our real-world setting as a learning problem.

Model Design: We select & design an appropriate parametric model.

Optimization: We adjust our model’s parameters to minimize the loss.

Predict & Evaluate: We see how well our model performs.

4 of 19

The Learning Problem

5 of 19

The Learning Problem

Suppose you want an autonomous system that can perform an intelligent task.

You could manually program the rules.

Or you could try to learn the rules from data.

6 of 19

Different Learning Problem Setups

7 of 19

Supervised Learning

high when predictions are bad, low when predictions are good.

In Linear Regression, we approximate the relationship between X and Y as a linear function

We obtain the parameters of our linear regression model by minimizing our loss function.

8 of 19

Self-supervised Learning?

Problem: collecting labeled data is labor-intensive, making it challenging to scale.

“Workers at the headquarters of Ruijin Technology Company in Jiaxian, Henan Province”

Photo: Yan Cong for The New York Times, 2018

Self-supervised learning constructs labels from data without requiring explicit labeling.

This enables more scalable + robust learning.

Also, humans aren’t very good / consistent when labeling data

9 of 19

Model Design

10 of 19

Which features do we use?

Features are the inputs provided to our model.

Using non-linear features (x, x²) lets a linear model capture nonlinear relationships!

Feature engineering is computing new features from existing features.

In classic ML, features are manually designed. �In Deep Learning, features are learned from data.

11 of 19

Which model do we use?

A model family is the set of functions you allow �(e.g. linear models)

More parameters = more expressive power

12 of 19

Optimization

AKA Training

13 of 19

Goal: Find w* that minimizes training loss.

14 of 19

Closed-form Solution vs Iterative Optimization

For linear regression with Mean Squared Error loss, we have a formula for the optimal solution.

w* = (XᵀX)⁻¹ XᵀY

For most machine learning models, there is no formula to obtain the model parameters that minimize the loss.

In these cases, we must use an algorithm that iteratively improves the model’s parameters.

15 of 19

Model Evaluation

16 of 19

We want generalization.

Generalization is how well the fitted model does on data it has never seen.

Underfitting is when the model lacks the expressive power to capture the true relationship in the data.

Overfitting is when the model has too much expressive power, and fits to noise in the dataset.

Source: Torralba, Isola & Freeman, Foundations of Computer Vision (MIT Press, 2024), Fig. 11.1 — visionbook.mit.edu

17 of 19

train 60%

validation 20%

test 20%

Train�Used to fit our model.

Validation �Used to compare candidate models.

Test �Used to evaluate our final model.

Train/Validation/Test Splits

To understand how well our model generalizes to unseen data, we can just split up our dataset into chunks that we don’t train on.

18 of 19

The ML Lifecycle

Model Design: We select & design an appropriate parametric model.

Optimization: We adjust our model’s parameters to minimize the loss.

Predict & Evaluate: We see how well our model performs.

Learning Problem: We frame our real-world setting as a learning problem.

Using our insights to re-evaluate our �learning problem setup, �model design, and optimization method.

19 of 19

Thank you!