1 of 37

Lecture 39

Case Studies in Tech

DATA 8

Spring 2024

2 of 37

Announcements

  • Project 3 due Friday 4/26
  • Homework 12 due today at 5pm
  • My OH are today 3-5pm @ FSM
  • Last lecture on Friday!
  • Homework 13 release tomorrow and is optional
    • If 50% of the class submits, EVERYONE gets

3 extra credit points on the Final Exam!

3 of 37

Prediction

4 of 37

Intro to Statistical Predictions

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

Predicted

Final

Midterm

Slope

Intercept

Final

90

80

60

50

40

Midterm

30 40 50 60 70 80

5 of 37

Which Line Do We Choose?

Final

90

80

60

50

40

Midterm

30 40 50 60 70 80

6 of 37

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 37

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 37

Machine Learning

9 of 37

Why Use Machine Learning?

Predicted Final = π‘š1 Midterm +

π‘š2 Experience +

π‘š3 log(Boba) +

π‘š4 sin(Exercise)

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

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

10 of 37

Images as Numbers

RGB (158, 99, 57)

RGB (170, 135, 114)

11 of 37

Predictions for Images (Simplified)

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

Millions of

RGB values

Millions of

Slopes (aka Weights)

12 of 37

Predictions for Images (Actual)

Image

Pixels

Image

Features

Prediction

Multiply by Weights

13 of 37

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 37

Training is Intense!

15 of 37

Example 1:

Self Driving Cars

16 of 37

Scene Categorization

17 of 37

How to Categorize the Scene

Step 1: Collect a Bunch of Data

18 of 37

How to Categorize the Scene

Step 2: Label Your Data

Labeled by

Hand

19 of 37

How to Categorize the Scene

Step 3: Train Your Model

20 of 37

How to Categorize the Scene

Step 4: Make Predictions

21 of 37

Example 2:

Self Driving Cars

22 of 37

Depth Estimation

23 of 37

How to Estimate Depth

Step 1: Collect a Bunch of Data

24 of 37

How to Estimate Depth

Step 2: Label Your Data

Labeled by

Radar

25 of 37

How to Estimate Depth

Step 3: Train Your Model

26 of 37

How to Estimate Depth

Step 4: Make Predictions

27 of 37

Example 3:

AI Umpire

28 of 37

Automated Officiating

29 of 37

How to Automate Officiating

Step 1: Collect a Bunch of Data

30 of 37

How to Automate Officiating

Step 2: Label Your Data

Labeled by

Customers

31 of 37

How to Automate Officiating

Step 3: Train Your Model

32 of 37

How to Automate Officiating

Step 4: Make Predictions

33 of 37

Challenges & Considerations

34 of 37

Prediction Dimensionality

35 of 37

Prediction Fidelity

36 of 37

Prediction Computation

60 MPH

37 of 37

Thank You!