CSE 163
ML and Images�
Suh Young Choi�
🎶 Listening to: Unwed Sailor
💬 Before Class: You can instantly become fluent in any language, but you’re banned from traveling anywhere that uses it as an official language. What language do you pick?
Announcements
CP 3 and LR 6 due Monday 8/11
Project Report/Code due Thursday 8/14
Two more resubmission periods remaining, unless…
2
This Time
Last Time
3
Machine Learning, revisited
Terms from machine learning
4
ML + Images
How do we do machine learning on images?
5
10 | 20 | 30 |
40 | 50 | 60 |
70 | 80 | 90 |
10 |
20 |
30 |
40 |
50 |
60 |
70 |
80 |
90 |
Raw Image
Unrolled Image
ML + Images
Pros: Simple transformation (just a call to reshape!)
Cons: It loses the idea of “neighboring” pixels (up/down)
6
Despite these drawbacks, it can work in practice on some problems!
Neural Network
Based on how our brains �work
7
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.
8
3
-2
4
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.
9
3
-2
4
0
1
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.
10
3
-2
4
0
1
0 * 3 + 1 *(-2) - 4 = -6
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.
11
3
-2
4
0
1
0 * 3 + 1 *(-2) - 4 = -6
squish(-6) = 0
Image Classification
12
Unsupervised
Learning
So far, we have seen supervised machine learning, where we have to explicitly shown the algorithm the labels
Unsupervised machine learning lets the algorithm try to learn trends on its own without providing explicit labels
Examples
13
Project Deliverable Details
Visualizations MUST include:
Include in any captions:
14
Project Deliverable Details
Fig 1. A line plot showing the relationship between shark ages in months and caudal fin lengths in inches.
Project Deliverable Details
Don’t let numbers float (ha) in the vacuum!
16
Project Deliverable Details
Length requirements
17
Before Next Time
Next Time
18