1 of 8

CSE 163

ML and Images

��Hunter Schafer

Questions During Class? Ask in Zoom chat!

💬Before Class: Favorite board/card game?

🎵Music: Carly Rae Jepsen Dedicated Side B

2 of 8

Machine Learning

Terms from machine learning

  • Features / labels
  • Learning algorithm
  • Model
  • Model class
  • Training set / test set
  • Parameters / Hyperparameters

2

3 of 8

ML + 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

3

10

20

30

40

50

60

70

80

90

10

20

30

40

50

60

70

80

90

Raw Image

Unrolled Image

4 of 8

ML + Images

Pros: Simple transformation (just a call to reshape!)

Cons: It loses the idea of “neighboring” pixels (up/down)

  • Most machine learning models don’t take position of the features into account
  • This is where more complex models like convolutional neural networks come in to encode that local information as features

4

Despite these drawbacks, it can work in practice on some problems!

5 of 8

Neural Network

Based on how our brains �work

5

6 of 8

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.

6

3

-2

4

7 of 8

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

  • Clustering
  • Outlier detection

7

8 of 8

Group Work:

Best Practices

When you first working with this group:

  • Turn on your mic / camera or introduce yourself in chat
    • We prefer mic/camera if available to encourage sense of human interaction :)
  • Share your name + where in the world you’re calling in from!
  • Elect one person to “drive” and share their screen for reference

Tips:

  • Starts with making sure everyone agrees to work on the same problem
  • Make sure everyone gets a chance to contribute!
  • Ask if everyone agrees and periodically ask each other questions!
  • Call TAs over for help if you need any!

8