1 of 14

CSE 163

ML and Images

Arpan Kapoor�Summer 2026��💭Icebreaker (discuss with neighbors):

Favorite class you’ve taken at UW so far?

Add to our Slido!

slido.com

#2348882

2 of 14

Announcements

  • Programming Practice 7 due tomorrow at 11:59pm
  • Homework 5 - Mapping due Friday, August 14th at 11:59pm
  • Project Part 3 - Report/Code due Sunday, August 16th at 11:59pm
  • Resubmission Cycle 6 due Friday, August 14th at 11:59pm
    • This is the last resubmission cycle!
  • Practice Exam 1 solutions released

slido.com

#2348882

3 of 14

ML on Images

  • How do we do machine learning on images?
  • Simplest: Unroll the image into a vector
  • Complex: Use other tools to extract features from the images

Raw Image

“Unrolled”

Image

10

20

30

40

50

60

70

80

90

10

20

30

40

50

60

70

80

90

slido.com

#2348882

4 of 14

ML on Images

  • Pros: Simple transformation (call to reshape!)
  • Cons: Loss of idea of “neighboring” pixels (up/down)
    • Most machine learning models don’t take position of features into account
    • More complex models (e.g. convolutional neural networks) come in to encode the local information as features

slido.com

#2348882

5 of 14

Neural Networks - based on our brains

slido.com

#2348882

6 of 14

Image Classification

slido.com

#2348882

7 of 14

Neural Networks - Example

What is the output for this neuron if the inputs are 0 for the first input and 1 for the second?

  • The activation function is the step function (0 if negative, 1 otherwise)
  • The bias should be subtracted from the weighted sum before applying the activation function

3

-2

4

slido.com

#2348882

8 of 14

Neural Networks - Example

What is the output for this neuron if the inputs are 0 for the first input and 1 for the second?

  • The activation function is the step function (0 if negative, 1 otherwise)
  • The bias should be subtracted from the weighted sum before applying the activation function

3

-2

4

0 * 3 + 1 *(-2) - 4 = -6

slido.com

#2348882

9 of 14

Neural Networks - Example

What is the output for this neuron if the inputs are 0 for the first input and 1 for the second?

  • The activation function is the step function (0 if negative, 1 otherwise)
  • The bias should be subtracted from the weighted sum before applying the activation function

3

-2

4

0 * 3 + 1 *(-2) - 4 = -6

squish(-6) = 0

slido.com

#2348882

10 of 14

Unsupervised Learning

  • So far, we have seen supervised machine learning. We explicitly show the algorithm the labels.
  • Unsupervised machine learning lets the algorithm try to lean the trends on its own without providing explicit labels.
    • Clustering
    • Outlier detection
    • Dimensionality reduction

slido.com

#2348882

11 of 14

Project Deliverables

12 of 14

Graphs

Fig 1. A line plot showing the relationship between shark ages in months and caudal fin lengths in inches.

slido.com

#2348882

13 of 14

Don’t let numbers float!

  • Accuracy / MSE – what do these numbers mean for your ML model?
  • Pearson’s R or R-squared values – what does this imply about the strength or direction of the relationship between variables?
  • p-values – do you reject or fail to reject the null hypothesis? What does this imply about your results?
  • Percentages, counts, averages, sums, etc.
  • Make sure your numbers have context attached to them!

slido.com

#2348882

14 of 14

Length Requirements

  • 10 - 15 pages for the reports (excluding optional title page and appendix)
  • No need to include code in your report directly; keep all code in your repository
  • You can refer to which files you’d like to emphasize in your report
  • Include generated figures and graphs in your report itself! We won’t look at your repo for those

slido.com

#2348882