1 of 38

Lecture 39

Case Studies in Tech

DATA 8

Fall 2023

2 of 38

Announcements

  • Project 3 due Friday 12/1
  • Homework 12 due tonight
  • Last lecture on Friday!
  • Fill out course evaluations by Dec 10!
    • If 50% of the class fills out, EVERYONE gets

3 extra credit points on the Final Exam!

3 of 38

Prediction

4 of 38

Intro to Statistical Predictions

𝑦 = π‘šπ‘₯ + 𝑏

Predicted

Final

Midterm

Slope

Intercept

Final

​

90

​

​

80

​

60

​

​

50

​

40

​

​

​

Midterm

30 40 50 60 70 80

5 of 38

Which Line Do We Choose?

Final

​

90

​

​

80

​

60

​

​

50

​

40

​

​

​

Midterm

30 40 50 60 70 80

6 of 38

How Good is the Line?

Final

​

90

​

​

80

​

60

​

​

50

​

40

​

​

​

Midterm

30 40 50 60 70 80

Training

Example

Prediction

Training Error

7 of 38

How to Find the Best Line

Classical Statistics:

π‘š = π‘Ÿ x πœŽπ‘¦ /𝜎π‘₯ 𝑏 = 𝑦 - π‘šπ‘₯

Machine Learning:

  1. Pick a random slope and intercept (𝑦 = π‘šπ‘₯ + 𝑏)
  2. Calculate the training error
  3. Adjust π‘š and 𝑏
  4. Repeat steps (2) and (3) until error stops decreasing

8 of 38

Machine Learning

9 of 38

Why Use Machine Learning?

Predicted Final = π‘š1 Midterm +

π‘š2 Experience +

π‘š3 log(Chocolate) +

π‘š4 sin(Exercise)

= π‘š1 π‘₯1 + π‘š2 π‘₯2 + π‘š3 π‘₯3 + π‘š4 π‘₯4

= 𝑓 (π‘š, π‘₯)

10 of 38

Images as Numbers

RGB (158, 99, 57)

RGB (170, 135, 114)

11 of 38

Predictions for Images (Simplified)

Prediction = 𝑓 (π‘š, π‘₯)

Millions of

RGB values

Millions of

Slopes (aka Weights)

12 of 38

Predictions for Images (Actual)

Image

Pixels

Image

Features

Prediction

Multiply by Weights

13 of 38

Training the Model

Machine Learning:

  • Pick a random set of weights and features (π‘š)
  • Make a prediction 𝑓 (π‘š, π‘₯) on every training example
  • Calculate the training error
  • Adjust π‘š
  • Repeat steps (2) and (3) until error stops decreasing

14 of 38

Training is Intense!

15 of 38

Example 1:

Self Driving Cars

16 of 38

Scene Categorization

17 of 38

How to Categorize the Scene

Step 1: Collect a Bunch of Data

18 of 38

How to Categorize the Scene

Step 2: Label Your Data

Labeled by

Hand

19 of 38

How to Categorize the Scene

Step 3: Train Your Model

20 of 38

How to Categorize the Scene

Step 4: Make Predictions

21 of 38

Example 2:

Self Driving Cars

22 of 38

Depth Estimation

23 of 38

How to Estimate Depth

Step 1: Collect a Bunch of Data

24 of 38

How to Estimate Depth

Step 2: Label Your Data

Labeled by

Radar

25 of 38

How to Estimate Depth

Step 3: Train Your Model

26 of 38

How to Estimate Depth

Step 4: Make Predictions

27 of 38

Example 3:

A.I. Umpire

28 of 38

Automated Officiating

29 of 38

How to Automate Officiating

Step 1: Collect a Bunch of Data

30 of 38

How to Automate Officiating

Step 2: Label Your Data

Labeled by

Customers

31 of 38

How to Automate Officiating

Step 3: Train Your Model

32 of 38

How to Automate Officiating

Step 4: Make Predictions

33 of 38

Challenges & Considerations

34 of 38

Prediction Dimensionality

35 of 38

Prediction Representation

36 of 38

Prediction Fidelity

37 of 38

Prediction Computation

60 MPH

38 of 38

Thank You!