07 Overview of Machine Learning
07 Overview of Machine Learning
Overview
Machine Learning
Real
World
Questio
n to
Answer
ML Pathway
Problem
to Solve
Real
World
Questio
n to
Answer
Real
World
Questio
n to
Answer
Real
World
Data
Analysis
ML Pathway
Clean &
Collect Explorator
Organiz
& Store y Data
e
Data Analysis
Data
Real
World
ML Pathway
Clean &
Collect Explorator Machine
Organiz
& Store y Data Learning
e
Data Analysis Models
Data
Real Supervised Learning:
World Predict an Outcome
Unsupervised Learning:
Discover Patterns in Data
ML Pathway
Clean &
Collect Explorator Machine
Organiz
& Store y Data Learning
e
Data Analysis Models
Data
Real Supervised Learning:
World Predict an Outcome
Unsupervised Learning:
Discover Patterns in Data
Machine Learning
● Simple Example:
○ Predict the price a house should sell
at given its current features
(Area,Bedrooms,Bathrooms,etc…)
Machine Learning
● Supervised Learning
○ Using historical and labeled data,
the machine learning model predicts
a value.
● Unsupervised Learning
○ Applied to unlabeled data, the
machine learning model discovers
possible patterns in the data.
Machine Learning
● Supervised Learning
○ Requires historical labeled data:
■ Historical
● Known results and data from the
past.
■ Labeled
● The desired output is known.
Machine Learning
● Supervised Learning
○ Two main label types
■ Categorical Value to Predict
● Classification Task
■ Continuous Value to Predict
● Regression Task
Machine Learning
● Supervised Learning
○ Classification Tasks
■ Predict an assigned category
● Cancerous vs. Benign Tumor
● Fulfillment vs. Credit Default
● Assigning Image Category
○ Handwriting Recognition
Machine Learning
● Supervised Learning
○ Regression Tasks
■ Predict a continuous value
● Future prices
● Electricity loads
● Test scores
Machine Learning
● Unsupervised Learning
○ Group and interpret data without a
label.
○ Example:
■ Clustering customers into separate
groups based off their behaviour
features.
Machine Learning
● Unsupervised Learning
○ Major downside is because there was
no historical “correct” label, it is much
harder to evaluate performance of an
unsupervised learning algorithm.
Machine Learning
Real
World
Machine Learning
Scikit-learn
Machine Learning
200 3 2 $500,000
190 2 1 $450,000
230 3 3 $650,000
180 1 1 $400,000
210 2 2 $550,000
Machine Learning
200 3 2 $500,000
190 2 1 $450,000
230 3 3 $650,000
180 1 1 $400,000
210 2 2 $550,000
Machine Learning
200 3 2 $500,000
190 2 1 $450,000
230 3 3 $650,000
180 1 1 $400,000
210 2 2 $550,000
Machine Learning
● Data Product:
○ Input house features
○ Output predicted selling price
Area m2 Bedrooms Bathrooms Price
200 3 2 $500,000
190 2 1 $450,000
230 3 3 $650,000
180 1 1 $400,000
210 2 2 $550,000
Machine Learning
200 3 2 $500,000
190 2 1 $450,000
230 3 3 $650,000
180 1 1 $400,000
210 2 2 $550,000
Machine Learning
Supervised Learning:
Predict an Outcome
Machine Learning
Supervised Learning:
Predict an Outcome
Machine Learning
Supervised Learning:
Predict an Outcome
Data
Machine Learning
Data
Machine Learning
X:
Data Features
y: Label
Machine Learning
X: 200 3 2 $500,000
Data Features
y: Label 190 2 1 $450,000
230 3 3 $650,000
180 1 1 $400,000
210 2 2 $550,000
Machine Learning
X: 200 3 2 $500,000
Data Features
y: Label 190 2 1 $450,000
230 3 3 $650,000
180 1 1 $400,000
210 2 2 $550,000
Machine Learning
X: 200 3 2 $500,000
Data Features
y: Label 190 2 1 $450,000
230 3 3 $650,000
180 1 1 $400,000
210 2 2 $550,000
Machine Learning
X: 200 3 2 $500,000
Data Features
y: Label 190 2 1 $450,000
230 3 3 $650,000
180 1 1 $400,000
210 2 2 $550,000
Machine Learning
X: 200 3 2 $500,000
Data Features
y: Label 190 2 1 $450,000
230 3 3 $650,000
180 1 1 $400,000
210 2 2 $550,000
Machine Learning
X: 200 3 2 $500,000
Data Features
y: Label 190 2 1 $450,000
230 3 3 $650,000
180 1 1 $400,000
210 2 2 $550,000
Supervised Machine Learning Process
Test
Data Set
Supervised Machine Learning Process
Test
Data Set
Supervised Machine Learning Process
Test
Data Set
Supervised Machine Learning Process
200 3 2 $500,000
190 2 1 $450,000
230 3 3 $650,000
180 1 1 $400,000
210 2 2 $550,000
Supervised Machine Learning Process
200 3 2 $500,000
190 2 1 $450,000
230 3 3 $650,000
180 1 1 $400,000
210 2 2 $550,000
Supervised Machine Learning Process
200 3 2 $500,000
190 2 1 $450,000
230 3 3 $650,000
180 1 1 $400,000
210 2 2 $550,000
Supervised Machine Learning Process
200 3 2 $500,000
190 2 1 $450,000
230 3 3 $650,000
180 1 1 $400,000
210 2 2 $550,000
Supervised Machine Learning Process
200 3 2 $500,000
190 2 1 $450,000
230 3 3 $650,000
180 1 1 $400,000
210 2 2 $550,000
Supervised Machine Learning Process
200 3 2 $500,000
190 2 1 $450,000
230 3 3 $650,000
180 1 1 $400,000
210 2 2 $550,000
Supervised Machine Learning Process
200 3 2 $500,000
190 2 1 $450,000
230 3 3 $650,000
180 1 1 $400,000
210 2 2 $550,000
Supervised Machine Learning Process
200 3 2 $500,000
190 2 1 $450,000
230 3 3 $650,000
180 1 1 $400,000
210 2 2 $550,000
Supervised Machine Learning Process
200 3 2 $500,000
190 2 1 $450,000
230 3 3 $650,000
180 1 1 $400,000
210 2 2 $550,000
Supervised Machine Learning Process
200 3 2 $500,000
TRAIN 190 2 1 $450,000
230 3 3 $650,000
180 1 1 $400,000
210 2 2 $550,000
Supervised Machine Learning Process
200 3 2 $500,000
TRAIN 190 2 1 $450,000
230 3 3 $650,000
180 1 1 $400,000
TEST
210 2 2 $550,000
Supervised Machine Learning Process
200 3 2 $500,000
X TRAIN 190 2 1 $450,000 Y TRAIN
230 3 3 $650,000
200 3 2 $500,000
190 2 1 $450,000
230 3 3 $650,000
180 1 1 $400,000
210 2 2 $550,000
Supervised Machine Learning Process
200 3 2 $500,000
230 3 3 $650,000
180 1 1 $400,000
TEST
210 2 2 $550,000
Supervised Machine Learning Process
200 3 2 $500,000
230 3 3 $650,000
Supervised Machine Learning Process
180 1 1
TEST
210 2 2
Supervised Machine Learning Process
180 1 1
TEST
210 2 2
Supervised Machine Learning Process
180 1 1
TEST
210 2 2
Supervised Machine Learning Process
$410,000 180 1 1
TEST
$540,000 210 2 2
Supervised Machine Learning Process
$410,000 $400,000
$540,000 $550,000
Supervised Machine Learning Process
$410,000 $400,000
$540,000 $550,000
Supervised Machine Learning Process
$410,000 $400,000
$540,000 $550,000
Supervised Machine Learning Process
● Split Data
Training
Data
Set
X:
Data Features
Y: Label
Test
Data Set
Supervised Machine Learning Process
Test
Data Set
Supervised Machine Learning Process
Test
Evaluate
Data Set
Performanc
e
Supervised Machine Learning Process
Test
Evaluate
Data Set
Performanc
e
Supervised Machine Learning Process
Test
Evaluate
Data Set
Performanc
e
Supervised Machine Learning Process
Test
Evaluate
Data Set
Performanc
e
Supervised Machine Learning Process
Test
Data Set
Supervised Machine Learning Process
Test Evaluate
Data Set Performanc
e
Supervised Machine Learning Process
Test Evaluate
Data Set Performanc
e
Supervised Machine Learning Process
Test
Data Set Evaluate
Performanc
e
Supervised Machine Learning Process
X and
y
Data
Supervised Machine Learning Process
Test
Data Set
Supervised Machine Learning Process
Test
Data Set
Supervised Machine Learning Process
Test
Data Set Evaluate
Performanc
e
Supervised Machine Learning Process
Test
Data Set Evaluate
Performanc
e
Supervised Machine Learning Process
Test
Data Set Evaluate
Performanc
e
Machine Learning
Clean &
Collect Explorator Machine
Organiz
& Store y Data Learning
e
Data Analysis Models
Data
Real
World
Servic
e
Dashboar
Data d
Product
Application