Introduction to Machine Learning
1
Jeffrey A. Chan Santiago
Goals
2
Applications
3
4
Population
Sample Data
Data Point
Probability
Statistics
ML
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
Is today a good day to go to the Beach?
6
Precipitation Probability
Rip Currents
Good Day
Bad Day
Today
Is today a good day to go to the Beach?
7
Precipitation Probability
Rip Currents
Good Day
Bad Day
Today
Is today a good day to go to the Beach?
8
Precipitation Probability
Rip Currents
Good Day
Bad Day
Today
Is today a good day to go to the Beach?
9
Precipitation Probability
Rip Currents
Good Day
Bad Day
Today
Is today a good day to go to the Beach?
10
Precipitation Probability
Rip Currents
Good Day
Bad Day
Today
Good Features Matters
11
Wind Speed
Rip Currents
Good Day
Bad Day
Today
Type of learning
12
Type of learning
13
Type of learning
14
Basic Principles of ML
15
Machine Learning Components
16
Loss = 4
Loss = 3
Loss = 7.5
Training Model
17
Is today a good day to go to the Beach?
18
Precipitation Probability
Rip Currents
Good Day
Bad Day
Today
Is today a good day to go to the Beach?
19
Precipitation Probability
Rip Currents
Good Day
Bad Day
Today
Is today a good day to go to the Beach?
20
Precipitation Probability
Rip Currents
Good Day
Bad Day
Today
Is today a good day to go to the Beach?
21
Precipitation Probability
Rip Currents
Good Day
Bad Day
Today
Is today a good day to go to the Beach?
22
Precipitation Probability
Rip Currents
Good Day
Bad Day
Today
Model Evaluation and Generalization
23
Training Set
Testing Set
Trained model
Evaluation
Accuracy 1.0
Is today a good day to surf?
24
Precipitation Probability
Swell size
Good Day
Bad Day
Test Set
Is today a good day to surf?
25
Precipitation Probability
Swell size
Good Day
Bad Day
Test Set
Overfitting
Is today a good day to surf?
26
Precipitation Probability
Swell size
Good Day
Bad Day
Test Set
Underfitting
Overfitting
27
Code Demonstration
28
Logistic Regression
29
Precipitation Probability
Swell size
Good Day
Bad Day
Test Set
Logistic Regression
30
Code
31
K-Nearest Neighbors
32
Precipitation Probability
Swell size
Good Day
Bad Day
Test Set
3-Nearest Neighbors
33
Precipitation Probability
Swell size
Good Day
Bad Day
Test Set
5-Nearest Neighbors
34
Precipitation Probability
Swell size
Good Day
Bad Day
Test Set
Code
35
Conclusion
36