voxxed days thesaloniki 2016 - machine learning for developers

56
Machine Learning for Developers Danilo Poccia, Technical Evangelist @danilop danilop

Upload: voxxed-days-thessaloniki

Post on 16-Apr-2017

87 views

Category:

Software


3 download

TRANSCRIPT

Page 1: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

Machine Learning for Developers

Danilo Poccia, Technical Evangelist @danilop

danilop

Page 2: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

Credit: Gerry Cranham/Fox Photos/Getty Images http://www.telegraph.co.uk/travel/destinations/europe/united-kingdom/england/london/galleries/The-history-of-the-Tube-in-pictures-150-years-of-London-Underground/1939-ticket-examin/

Page 3: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

Credit: Gerry Cranham/Fox Photos/Getty Images http://www.telegraph.co.uk/travel/destinations/europe/united-kingdom/england/london/galleries/The-history-of-the-Tube-in-pictures-150-years-of-London-Underground/1939-ticket-examin/

1939 London Underground

Page 4: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

Batch

Report

Page 5: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

Batch

Report

Real-time

Alerts

Page 6: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

Batch

Report

Real-time

Alerts

Prediction

Forecast

Page 7: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

Predictions

Page 8: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

Data Predictions

Page 9: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

ModelData Predictions

Page 10: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

Model

Page 11: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

Machine Learning

Page 12: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

SupervisedLearning

Machine Learning

UnsupervisedLearning

The task of inferringa model

from labeledtraining data

The task of inferringa model

to describehidden structure

from unlabeled data

Page 13: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

ReinforcementLearning

Performa certain goal in a

dynamic environment, without an explicit

“teacher”

Page 14: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

Driving a vehicle

Playing a game against an opponent

Reinforce

ment

Learning

Page 15: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

ClusteringUnsuperv

ised

Learning

Page 16: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

ClusteringUnsuperv

ised

Learning

Page 17: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

ClusteringUnsuperv

ised

Learning

Page 18: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

Regression

Binary Classification

Multi-class Classification

Supervise

d

Learning

Page 19: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

Validation

Supervise

d

Learning

Page 20: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

Training from Labeled DataSuperv

ised

Learning

Training

Validation

70%

30%

Page 21: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

Be Careful of OverfittingSuperv

ised

Learning

Page 22: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

Be Careful of OverfittingSuperv

ised

Learning

Page 23: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

Be Careful of OverfittingSuperv

ised

Learning

Page 24: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

Better Model,Different Predictions

Supervise

d

Learning

Page 25: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

Better ModelSuperv

ised

Learning

Page 26: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

?Data Model

Page 27: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

Amazon EMRwith Spark (MLib)

Data Model

Page 28: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

<demo>...

</demo>

Page 29: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

Recommender: An Analysis ofCollaborative Filtering Techniques

Christopher R. Aberger

http://stanford.io/28OR3XE

More Info

Page 30: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

Amazon EMRwith Spark (MLib)

Data Model

Page 31: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

Data Scientists“Scalability”

Page 32: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

AmazonMachine Learning

(Amazon ML)

Data Model

Page 33: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

AmazonMachine Learning

(Amazon ML)

Data Model

BatchPredictions

Page 34: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

AmazonMachine Learning

(Amazon ML)

Data Model

BatchPredictions

Real-timePredictions

Page 35: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

Binary Classification Multiclass Classification Regression

Logistic Regression(Logistic Loss

Function + SGD)

Multinomial Logistic Regression

(Multinomial Logistic Loss + SGD)

Linear Regression(Squared Loss

Function + SGD)

The optimization technique used in Amazon ML is online Stochastic Gradient Descent (SGD)

Page 36: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

<demo>...

</demo>

Page 37: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

AmazonMachine Learning

(Amazon ML)

Data Model

BatchPredictions

Real-timePredictions

Page 38: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

What about Deep Learning?

Page 39: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

Neural Networks

Perceptron

Layers

Page 40: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

Perceptron

https://upload.wikimedia.org/wikipedia/commons/8/8c/Perceptron_moj.png https://upload.wikimedia.org/wikipedia/commons/thumb/f/f1/Logistic-sigmoid-vs-scaled-probit.svg/240px-Logistic-sigmoid-vs-scaled-probit.svg.png

Page 41: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

NeuralNetwork

Architectures

http://www.asimovinstitute.org/neural-network-zoo/

Page 42: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

http://www.asimovinstitute.org/neural-network-zoo/

Page 43: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

http://www.asimovinstitute.org/neural-network-zoo/

Page 44: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

Deep Scalable SparseTensor Network Engine

(DSSTNE)

Pronounced “Destiny”

An Amazon developed library for buildingDeep Learning (DL) Machine Learning (ML) models

https://github.com/amznlabs/amazon-dsstne

Open Source

Page 45: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

DSSTNE features for production workloads

Multi-GPUScale

Training and prediction both scale out to use multiple GPUs, spreading out computation and storage in a model-parallel fashion for

each layer

LargeLayers

Model-parallel scaling enables larger networks than are possible with a single GPU

SparseData

DSSTNE is optimized for fast performance on sparse datasets. Custom GPU kernels

perform sparse computation on the GPU, without filling in lots of zeroes

Page 46: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

First DSSTNE Benchmarks

https://medium.com/@scottlegrand/first-dsstne-benchmarks-tldr-almost-15x-faster-than-tensorflow-393dbeb80c0f

Page 47: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

Amazon EC2 P2 Instances

Up to:• 16 NVIDIA K80 GPUs• 64 vCPUs 732 GiB of host memory• combined 192 GB of GPU memory• 40 thousand parallel processing cores• 70 teraflops (single precision)• over 23 teraflops (double precision).• GPUDirect™ for up to 16 GPUs

Page 48: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

DSSTNEData Model

Page 49: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

Let’s Build a “Smart” Mobile App

Page 50: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

Real-timePredictions

AWSLambda

Function(s)

AmazonMachine Learning

Model

AmazonKinesisStream

AmazonRedshiftDatabase

Amazon S3Bucket

AmazonCognitoIdentity

Amazon SNSMobile Push

AmazonMobile

Analytics

AmazonKinesis

Firehose

“Smart”Mobile

App

Page 51: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

AWSLambda

Function(s)

AmazonMachine Learning

Model

AmazonKinesisStream

AmazonRedshiftDatabase

Amazon S3Bucket

AmazonCognitoIdentity

Amazon SNSMobile Push

AmazonMobile

Analytics

AmazonKinesis

Firehose

“Smart”Mobile

App

Where arethe Servers?

Page 52: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

Where arethe Servers?

Build Event-DrivenServerless Apps

And Focus on Your Idea

Page 53: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

AWS CLI

AWS SDKs

Automate

Page 54: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

Build Apps With Services,Not Servers

Page 55: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

aws.amazon.com/free

Page 56: Voxxed Days Thesaloniki 2016 - Machine Learning for Developers

Thank you

@danilop danilop