An Introduction To
Supervised Learning
Disclaimer!
Artificial Intelligence
Machine Learning …
Supervised Learning ...
Learning
Algorithm
A( , “Sports”)
B( , “Politics”)
C( , “Business”)
Model
(Function)
“Business”
P
fit() predict()
…
Our
Learning
Algorithm
Our
Model
(Function)
“Clean”
(10, “Not Clean”)
(120, “Clean”)
(30, “Not Clean”)
...
105
Minutes in
Washing Machine
Cleanliness
Our
Learning
Algorithm
Our
Model
(Function)
1
(10, 0)
(120, 1)
(30, 0)
...
105
Minutes in
Washing Machine
Cleanliness
Our
Learning
Algorithm
y
x
Minutes in
Washing Machine
Cleanliness
(10, 0)
(120, 1)
(30, 0)
...
Our
Learning
Algorithm
y
x
Minutes in
Washing Machine
Cleanliness
(10, 0)
(120, 1)
(30, 0)
...
1. Sort data
2. Scan from left
looking for change
in label
3. Set value of “a”
y
x
Minutes in
Washing Machine
Cleanliness
(10, 0)
(120, 1)
(30, 0)
...
1. Sort data
2. Scan from left
looking for change
in label
3. Set value of “a”
y
x(10, 0)
(120, 1)
(30, 0)
...
fit() predict()
Laundry Cleanliness (Data)
Laundry Cleanliness (Data & Model)
Satisfaction From Allowance (Data)
Satisfaction From Allowance (Data & Model)
Satisfaction From Allowance (Data & Model)
Number of Facebook Friends till Platform is
Attractive (Data)
Number of Facebook Friends till Platform is
Attractive (Data & Model)
Average Temperature for Successful Grape
Growing (Data)
Average Temperature for Successful Grape
Growing (Data & Model)
✗
✓
Learning Algorithms
Have Limited Expressibility
Learning
Algorithm
A( , “Sports”)
B( , “Politics”)
C( , “Business”)
Model
(Function)
“Business”, “Politics”, “Business”, ...
A
fit() predict()
…
Evaluation
B C, , , ...
Evaluate
Training vs Testing
B “Politics”
C “Business”
D “Business”
E “Sports”
F “Politics”
G “Politics”
H “Business”
A “Sports”
Training vs Testing
B “Politics”
C “Business”
D “Business”
E “Sports”
F “Politics”
G “Politics”
H “Business”
A “Sports”
fit()
predict()
“Sports”
“Politics”
“Business”
Evaluate
0.67
Over-fitting
(On to the whiteboard!)
Learning
Algorithm
Model
(Function)
1
(10, 0)
(120, 1)
(30, 0)
...
105
Minutes in
Washing Machine
Cleanliness
Learning
Algorithm
Model
(Function)
1
([10, 1.4], 0)
([120, 3], 1)
([30, 0.5], 1)
...
[105, 1.6]
Minutes in
Washing Machine
Cleanliness
Weight of Load
2D-Laundry Cleanliness (Data)
2D-Laundry Cleanliness
(Linear Model)
2D-Laundry Cleanliness
(QDA Model)
2D-Laundry Cleanliness
(Decision Tree Model)
2D-Laundry Cleanliness
(Random Forest Model)
2D-Laundry Cleanliness
(K-Nearest Neighbors Model)
2D-Laundry Cleanliness
(RBF SVM Model)
Learning
Algorithm
Model
(Function)
1
([10, 1.4,40, “Samsung”, ...], 0)
([120, 3, 50, “AEG”, ...], 1)
([30, 0.5, 30, “Siemens”, ...], 1)
...
[105, 1.6, 40, “AEG”, ...]
Minutes in
Washing Machine
Cleanliness
Weight of Load
Temperature
Washing Machine
Brand
Feature Extraction
A [124, 2, 40, 30, 12, ...]
Feature
Extractor
And now,
a demo with scikit-learn.

JOSA TechTalk: Introduction to Supervised Learning