1 of 36

Introduction to Machine Learning

1

Jeffrey A. Chan Santiago

2 of 36

Goals

  • Introduce ML to a broader and general audience.
  • Cover the intuition behind of ML.
  • Help you to understand how to apply ML in your field.

2

3 of 36

Applications

3

4 of 36

4

Population

Sample Data

Data Point

Probability

Statistics

ML

5 of 36

5

Population

Sample Data

Data Point

ML

Puerto Rican median income

Statistics

Prediction John’s income

Common words in spam email

Prediction of span email

6 of 36

Is today a good day to go to the Beach?

6

Precipitation Probability

Rip Currents

Good Day

Bad Day

Today

7 of 36

Is today a good day to go to the Beach?

7

Precipitation Probability

Rip Currents

Good Day

Bad Day

Today

8 of 36

Is today a good day to go to the Beach?

8

Precipitation Probability

Rip Currents

Good Day

Bad Day

Today

9 of 36

Is today a good day to go to the Beach?

9

Precipitation Probability

Rip Currents

Good Day

Bad Day

Today

10 of 36

Is today a good day to go to the Beach?

10

Precipitation Probability

Rip Currents

Good Day

Bad Day

Today

11 of 36

Good Features Matters

11

Wind Speed

Rip Currents

Good Day

Bad Day

Today

12 of 36

Type of learning

  • Supervised Learning

12

13 of 36

Type of learning

  • Supervised Learning
  • Unsupervised Learning

13

14 of 36

Type of learning

  • Supervised Learning
  • Unsupervised Learning
  • Reinforcement Learning

14

15 of 36

Basic Principles of ML

15

16 of 36

Machine Learning Components

  •  

16

Loss = 4

Loss = 3

Loss = 7.5

 

 

17 of 36

Training Model

  •  

17

 

 

18 of 36

Is today a good day to go to the Beach?

18

Precipitation Probability

Rip Currents

Good Day

Bad Day

Today

 

 

19 of 36

Is today a good day to go to the Beach?

19

Precipitation Probability

Rip Currents

Good Day

Bad Day

Today

 

 

20 of 36

Is today a good day to go to the Beach?

20

Precipitation Probability

Rip Currents

Good Day

Bad Day

Today

 

 

21 of 36

Is today a good day to go to the Beach?

21

Precipitation Probability

Rip Currents

Good Day

Bad Day

Today

 

 

22 of 36

Is today a good day to go to the Beach?

22

Precipitation Probability

Rip Currents

Good Day

Bad Day

Today

 

 

23 of 36

Model Evaluation and Generalization

23

Training Set

Testing Set

Trained model

Evaluation

Accuracy 1.0

24 of 36

Is today a good day to surf?

24

Precipitation Probability

Swell size

Good Day

Bad Day

Test Set

25 of 36

Is today a good day to surf?

25

Precipitation Probability

Swell size

Good Day

Bad Day

Test Set

Overfitting

26 of 36

Is today a good day to surf?

26

Precipitation Probability

Swell size

Good Day

Bad Day

Test Set

Underfitting

27 of 36

Overfitting

27

28 of 36

Code Demonstration

28

29 of 36

Logistic Regression

29

Precipitation Probability

Swell size

Good Day

Bad Day

Test Set

30 of 36

Logistic Regression

30

 

 

31 of 36

Code

31

32 of 36

K-Nearest Neighbors

32

Precipitation Probability

Swell size

Good Day

Bad Day

Test Set

33 of 36

3-Nearest Neighbors

33

Precipitation Probability

Swell size

Good Day

Bad Day

Test Set

34 of 36

5-Nearest Neighbors

34

Precipitation Probability

Swell size

Good Day

Bad Day

Test Set

35 of 36

Code

35

36 of 36

Conclusion

  • Model learn from data.
  • Feature representation matters!
  • Test set helps to measure generalization.

36