would i have survived the titanic? machine learning in microsoft azure

44
Would I have survived the Titanic? Machine Learning in Microsoft Azure SQL Saturday 409 Olivia Klose Technical Evangelist, Microsoft @oliviaklose | http://oliviaklose.com

Upload: olivia-klose

Post on 04-Aug-2015

374 views

Category:

Data & Analytics


0 download

TRANSCRIPT

Page 1: Would I have survived the Titanic? Machine Learning in Microsoft Azure

Would I have survived the Titanic? Machine Learning in Microsoft Azure

SQL Saturday 409Olivia Klose

Technical Evangelist, Microsoft

@oliviaklose | http://oliviaklose.com

Page 2: Would I have survived the Titanic? Machine Learning in Microsoft Azure

Organizer

SQLSaturday Rheinland 201513.06.2015

Page 3: Would I have survived the Titanic? Machine Learning in Microsoft Azure

Bronze Sponsor

SQLSaturday Rheinland 201513.06.2015

Page 4: Would I have survived the Titanic? Machine Learning in Microsoft Azure

Silver Sponsor

SQLSaturday Rheinland 201513.06.2015

Page 5: Would I have survived the Titanic? Machine Learning in Microsoft Azure

Gold Sponsor

SQLSaturday Rheinland 201513.06.2015

Page 6: Would I have survived the Titanic? Machine Learning in Microsoft Azure

You rock!

SQLSaturday Rheinland 201513.06.2015

Page 7: Would I have survived the Titanic? Machine Learning in Microsoft Azure

Save the date!

13.06.2015 SQLSaturday Rheinland 2015

Page 8: Would I have survived the Titanic? Machine Learning in Microsoft Azure

WHAT IS MACHINE LEARNING?

13.06.2015 SQLSaturday Rheinland 2015

Page 9: Would I have survived the Titanic? Machine Learning in Microsoft Azure

Machine Learning – Where?

Page 10: Would I have survived the Titanic? Machine Learning in Microsoft Azure

Machine Learning – Where?

Page 11: Would I have survived the Titanic? Machine Learning in Microsoft Azure

13.06.2015 SQLSaturday Rheinland 2015

Page 12: Would I have survived the Titanic? Machine Learning in Microsoft Azure

13.06.2015 SQLSaturday Rheinland 2015

Page 13: Would I have survived the Titanic? Machine Learning in Microsoft Azure

13.06.2015 SQLSaturday Rheinland 2015

Page 14: Would I have survived the Titanic? Machine Learning in Microsoft Azure

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

Page 15: Would I have survived the Titanic? Machine Learning in Microsoft Azure

What is Machine Learning?

Methods and Systems that...

adaptpredict new

data

optimise an

action

extract

information

summarise

data

Page 16: Would I have survived the Titanic? Machine Learning in Microsoft Azure

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

Page 17: Would I have survived the Titanic? Machine Learning in Microsoft Azure

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)

Page 18: Would I have survived the Titanic? Machine Learning in Microsoft Azure

Advanced Analytics Scenarios

13.06.2015 SQLSaturday Rheinland 2015

EXAMPLE SOLUTIONS

Page 19: Would I have survived the Titanic? Machine Learning in Microsoft Azure

THE MACHINE LEARNING

PROCESS

13.06.2015 SQLSaturday Rheinland 2015

Page 20: Would I have survived the Titanic? Machine Learning in Microsoft Azure

Machine Learning Process

Data

Clean

Transform

Maths

Build

Model

Predict

Page 21: Would I have survived the Titanic? Machine Learning in Microsoft Azure

Hm – what?

𝑓 X = y

Input

Matrix/Table

Output

Vector/Column

Page 22: Would I have survived the Titanic? Machine Learning in Microsoft Azure

Hm – what?

ℎ X = y

Input

Matrix/Table

Predicted Output

Vector/Column

Hypothesis

Page 23: Would I have survived the Titanic? Machine Learning in Microsoft Azure

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

Page 24: Would I have survived the Titanic? Machine Learning in Microsoft Azure

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 ?

Page 25: Would I have survived the Titanic? Machine Learning in Microsoft Azure

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 ?

Page 26: Would I have survived the Titanic? Machine Learning in Microsoft Azure

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 ?

Page 27: Would I have survived the Titanic? Machine Learning in Microsoft Azure

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 ?

Page 28: Would I have survived the Titanic? Machine Learning in Microsoft Azure

Vorhersagen

Forecast Temperature Windy Play?

Sunny Low No ?Forecast

Temperature WindyYes

Cloudy

Sunny

Low

Yes

Rainy

High

No

No

Yes

Yes

No

Page 29: Would I have survived the Titanic? Machine Learning in Microsoft Azure

Forecast

Temperature WindyYes

Cloudy

Sunny

Low

Yes

Rainy

High

No

No

Yes

Yes

No

Vorhersagen

Play!

Forecast Temperature Windy Play?

Sunny Low No ?

Page 30: Would I have survived the Titanic? Machine Learning in Microsoft Azure

Popular Machine Learning Models

Support Vector Machines

Neural Networks

Decision Trees

Page 31: Would I have survived the Titanic? Machine Learning in Microsoft Azure

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

Page 32: Would I have survived the Titanic? Machine Learning in Microsoft Azure

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

Page 33: Would I have survived the Titanic? Machine Learning in Microsoft Azure

AZURE MACHINE LEARNING

13.06.2015 SQLSaturday Rheinland 2015

Page 34: Would I have survived the Titanic? Machine Learning in Microsoft Azure

Azure Machine Learning

Make machine learning accessible to

every enterprise, data scientist, developer,

information worker, consumer, and device

anywhere in the world.

Page 35: Would I have survived the Titanic? Machine Learning in Microsoft Azure

Azure Machine Learning

HDInsightSQL Server VMSQL DBBlobs & Tables

Cloud

Desktop files

Excel spreadsheets

Others…

Lokal

ML

Studio

IDE for MLWeb Service

M

MonetiseStorage Account

Page 36: Would I have survived the Titanic? Machine Learning in Microsoft Azure

13.06.2015 SQLSaturday Rheinland 2015

DEMO

Surviving on the Titanic

Page 37: Would I have survived the Titanic? Machine Learning in Microsoft Azure

SO DO I NEED TO LEARN

MACHINE LEARNING NOW?

13.06.2015 SQLSaturday Rheinland 2015

DEMO

Azure ML Marketplace

Page 38: Would I have survived the Titanic? Machine Learning in Microsoft Azure

WHAT DID WE DO?

13.06.2015 SQLSaturday Rheinland 2015

Page 39: Would I have survived the Titanic? Machine Learning in Microsoft Azure

13.06.2015 SQLSaturday Rheinland 2015

http://aka.ms/MLCheatSheet

Page 40: Would I have survived the Titanic? Machine Learning in Microsoft Azure

Stream Analytics + Machine Learning

In limited preview

13.06.2015 SQLSaturday Rheinland 2015

SELECT text, sentiment(text)FROM myStream

http://aka.ms/stream-ml

Page 41: Would I have survived the Titanic? Machine Learning in Microsoft Azure

Free E-Book

http://aka.ms/MLbook

Page 42: Would I have survived the Titanic? Machine Learning in Microsoft Azure

Blog-Series on Machine Learning

http://aka.ms/MLSerie

http://aka.ms/AzureML-Ueberblick

http://aka.ms/AzureML-resources

Page 43: Would I have survived the Titanic? Machine Learning in Microsoft Azure

Free Video Series on Azure ML

http://aka.ms/AzureML-MVA

Page 44: Would I have survived the Titanic? Machine Learning in Microsoft Azure

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