would i have survived the titanic? machine learning in microsoft azure
TRANSCRIPT
Would I have survived the Titanic? Machine Learning in Microsoft Azure
SQL Saturday 409Olivia Klose
Technical Evangelist, Microsoft
@oliviaklose | http://oliviaklose.com
Organizer
SQLSaturday Rheinland 201513.06.2015
Bronze Sponsor
SQLSaturday Rheinland 201513.06.2015
Silver Sponsor
SQLSaturday Rheinland 201513.06.2015
Gold Sponsor
SQLSaturday Rheinland 201513.06.2015
You rock!
SQLSaturday Rheinland 201513.06.2015
Save the date!
13.06.2015 SQLSaturday Rheinland 2015
WHAT IS MACHINE LEARNING?
13.06.2015 SQLSaturday Rheinland 2015
Machine Learning – Where?
Machine Learning – Where?
13.06.2015 SQLSaturday Rheinland 2015
13.06.2015 SQLSaturday Rheinland 2015
13.06.2015 SQLSaturday Rheinland 2015
What is Machine Learning?
“The goal of machine learning is
to program computers
to use example data or past experience
to solve a given problem.”Introduction to Machine Learning, 2nd Edition, MIT Press
What is Machine Learning?
Methods and Systems that...
adaptpredict new
data
optimise an
action
extract
information
summarise
data
What is Machine Learning not?
Methods and Systems that...
do „Garbage-In-
Knowledge-Out“
predict without
data modelling &
feature
engineering
are always perfectreplace
business rules
Machine Learning – Warum?
1. Too complex: When you can’t code it.(e.g. Natural Language Processing, hand writing recognition, Computer Vision,…)
2. Too much: When you can’t scale it.(e.g. Spam & fraud detection, healthcare)
3. Too specialised: When you have to adapt/personalise.(e.g. Amazon, Netflix)
4. Autonomous: When you can’t track it.(e.g. AI gaming, robotics)
Advanced Analytics Scenarios
13.06.2015 SQLSaturday Rheinland 2015
EXAMPLE SOLUTIONS
THE MACHINE LEARNING
PROCESS
13.06.2015 SQLSaturday Rheinland 2015
Machine Learning Process
Data
Clean
Transform
Maths
Build
Model
Predict
Hm – what?
𝑓 X = y
Input
Matrix/Table
Output
Vector/Column
Hm – what?
ℎ X = y
Input
Matrix/Table
Predicted Output
Vector/Column
Hypothesis
Data
13.06.2015 SQLSaturday Rheinland 2015
Forecast Temperature Windy Play tennis?
Sunny Low Yes Play
Sunny High Yes Don't Play
Sunny High No Don't Play
Cloudy Low Yes Play
Cloudy High No Play
Cloudy Low No Play
Rainy Low Yes Don't Play
Rainy Low No Play
Sunny Low No ?
𝑓 x = 𝑦
Features / Input:
(Forecast, Temperature, Windy)
e.g. x = sunny, low, yes
Play /
Don‘t Play
Säubern, transformieren, Mathe
Forecast Temperature Windy Play tennis?
Sunny Very Low Yes Play
Sunny High Yes Don't Play
Sunny High Kinda Don't Play
Cloudy ? Yes One place
Fleecy
clouds
High No Play
Cloudy Low No Play
Rainy ? Yes Don't Play
Rainy Low No Play
Sunny Low No ?
Säubern, transformieren, Mathe
13.06.2015 SQLSaturday Rheinland 2015
[[ 1.000000],
[ -1.000000],
[ -1.000000],
[ 1.000000],
[ 1.000000],
[ 1.000000],
[ -1.000000],
[ 1.000000]]
Forecast Temperature Windy Play tennis?
Sunny Low Yes Play
Sunny High Yes Don't Play
Sunny High No Don't Play
Cloudy Low Yes Play
Cloudy High No Play
Cloudy Low No Play
Rainy Low Yes Don't Play
Rainy Low No Play
Sunny Low No ?
Säubern, transformieren, Mathe
13.06.2015 SQLSaturday Rheinland 2015
[[ 1.000000, 0.000000, 1.000000],
[ 1.000000, 1.000000, 1.000000],
[ 1.000000, 1.000000, -1.000000],
[ 2.000000, 0.000000, 1.000000],
[ 2.000000, 1.000000, -1.000000],
[ 2.000000, 0.000000, -1.000000],
[ 3.000000, 0.000000, 1.000000],
[ 3.000000, 0.000000, -1.000000]]
Forecast Temperature Windy Play tennis?
Sunny Low Yes Play
Sunny High Yes Don't Play
Sunny High No Don't Play
Cloudy Low Yes Play
Cloudy High No Play
Cloudy Low No Play
Rainy Low Yes Don't Play
Rainy Low No Play
Sunny Low No ?
Modell Bauen
Forecast
Temperature WindyYes
Cloudy
Sunny
Low
Yes
Rainy
High
No
No
Yes
Yes
No
Forecast Temperature Windy Play tennis?
Sunny Low Yes Play
Sunny High Yes Don't Play
Sunny High No Don't Play
Cloudy Low Yes Play
Cloudy High No Play
Cloudy Low No Play
Rainy Low Yes Don't Play
Rainy Low No Play
Sunny Low No ?
Vorhersagen
Forecast Temperature Windy Play?
Sunny Low No ?Forecast
Temperature WindyYes
Cloudy
Sunny
Low
Yes
Rainy
High
No
No
Yes
Yes
No
Forecast
Temperature WindyYes
Cloudy
Sunny
Low
Yes
Rainy
High
No
No
Yes
Yes
No
Vorhersagen
Play!
Forecast Temperature Windy Play?
Sunny Low No ?
Popular Machine Learning Models
Support Vector Machines
Neural Networks
Decision Trees
True Label
Positive Negative
Pre
dic
ted
Lab
el
Po
siti
ve
True positive(TP)
False positive(FP)
𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 =𝑡𝑝
𝑡𝑝 + 𝑓𝑝
Neg
ati
ve
False negative(FN)
True negative(TN)
𝑅𝑒𝑐𝑎𝑙𝑙 =𝑡𝑝
𝑡𝑝 + 𝑓𝑛𝐴𝑐𝑐𝑢𝑟𝑎𝑐𝑦 =
𝑡𝑝 + 𝑡𝑛
𝑡𝑝 + 𝑡𝑛 + 𝑓𝑝 + 𝑓𝑛
Is the model any good? Confusion Matrix
13.06.2015 SQLSaturday Rheinland 2015
True Label
Patient is sick. Patient is healthy.
Pre
dic
ted
Lab
el
Test
po
siti
ve
Test correctly states that
the patient is sick.
Test incorrectly states
that the patient is sick
(although he/she is
healthy).
𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 =𝑡𝑝
𝑡𝑝 + 𝑓𝑝
Test
neg
ati
ve Test incorrectly states
that the patient is
healthy (although being
sick).
Test correctly states that
the patient is healthy.
𝑅𝑒𝑐𝑎𝑙𝑙 =𝑡𝑝
𝑡𝑝 + 𝑓𝑛𝐴𝑐𝑐𝑢𝑟𝑎𝑐𝑦 =
𝑡𝑝 + 𝑡𝑛
𝑡𝑝 + 𝑡𝑛 + 𝑓𝑝 + 𝑓𝑛
Is the model any good? Confusion Matrix
13.06.2015 SQLSaturday Rheinland 2015
AZURE MACHINE LEARNING
13.06.2015 SQLSaturday Rheinland 2015
Azure Machine Learning
Make machine learning accessible to
every enterprise, data scientist, developer,
information worker, consumer, and device
anywhere in the world.
Azure Machine Learning
HDInsightSQL Server VMSQL DBBlobs & Tables
Cloud
Desktop files
Excel spreadsheets
Others…
Lokal
ML
Studio
IDE for MLWeb Service
M
MonetiseStorage Account
13.06.2015 SQLSaturday Rheinland 2015
DEMO
Surviving on the Titanic
SO DO I NEED TO LEARN
MACHINE LEARNING NOW?
13.06.2015 SQLSaturday Rheinland 2015
DEMO
Azure ML Marketplace
WHAT DID WE DO?
13.06.2015 SQLSaturday Rheinland 2015
13.06.2015 SQLSaturday Rheinland 2015
http://aka.ms/MLCheatSheet
Stream Analytics + Machine Learning
In limited preview
13.06.2015 SQLSaturday Rheinland 2015
SELECT text, sentiment(text)FROM myStream
http://aka.ms/stream-ml
Free E-Book
http://aka.ms/MLbook
Blog-Series on Machine Learning
http://aka.ms/MLSerie
http://aka.ms/AzureML-Ueberblick
http://aka.ms/AzureML-resources
Free Video Series on Azure ML
http://aka.ms/AzureML-MVA
Further Information
13.06.2015 SQLSaturday Rheinland 2015
aka.ms/azurenow
Machine Learning Series
http://aka.ms/MLserie
http://aka.ms/AzureML-Ueberblick
http://aka.ms/AzureML-resources
Machine Learning Video-Series (MVA)
http://aka.ms/AzureML-MVA
Machine Learning Studio
http://studio.azureml.net
Free E-Book
http://aka.ms/MLbook
oliviaklose.com
aka.ms/MLblog
@oliviaklose