Slide 1

Slide 1 text

Machine Learning for Developers Danilo Poccia Technical Evangelist, AWS @danilop Sébastien Stormacq Solution Architect, Alexa @sebsto

Slide 2

Slide 2 text

What to Expect from this Session Understand Machine Learning Terminology & Challenges Implement a Machine Learning Model Add Predictive Capabilities to your App Provide Your Customer with Voice UX

Slide 3

Slide 3 text

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/

Slide 4

Slide 4 text

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

Slide 5

Slide 5 text

Batch Report

Slide 6

Slide 6 text

Batch Report Real-time Alerts

Slide 7

Slide 7 text

Batch Report Real-time Alerts Prediction Forecast

Slide 8

Slide 8 text

Predictions

Slide 9

Slide 9 text

Data Predictions

Slide 10

Slide 10 text

Model Data Predictions

Slide 11

Slide 11 text

Model

Slide 12

Slide 12 text

Machine Learning

Slide 13

Slide 13 text

Supervised Learning Machine Learning Unsupervised Learning The task of inferring a model from labeled training data The task of inferring a model to describe hidden structure from unlabeled data

Slide 14

Slide 14 text

Reinforcement Learning Perform a certain goal in a dynamic environment, without an explicit “teacher”

Slide 15

Slide 15 text

Driving a vehicle Playing a game
 against an opponent R einforcem ent Learning

Slide 16

Slide 16 text

Clustering U nsupervised
 Learning

Slide 17

Slide 17 text

Clustering U nsupervised
 Learning

Slide 18

Slide 18 text

Clustering U nsupervised
 Learning

Slide 19

Slide 19 text

Regression Binary Classification Multi-class Classification Supervised
 Learning

Slide 20

Slide 20 text

Validation Supervised
 Learning

Slide 21

Slide 21 text

Training from Labeled Data Supervised
 Learning Training Validation 70% 30%

Slide 22

Slide 22 text

Training the Model Minimizing the Error Function Supervised
 Learning

Slide 23

Slide 23 text

Be Careful of Overfitting Supervised
 Learning

Slide 24

Slide 24 text

Be Careful of Overfitting Supervised
 Learning

Slide 25

Slide 25 text

Be Careful of Overfitting Supervised
 Learning

Slide 26

Slide 26 text

Better Model, Different Predictions Supervised
 Learning

Slide 27

Slide 27 text

Supervised
 Learning Better Model, Different Predictions

Slide 28

Slide 28 text

Regularization Adding a “cost” for using
 large parameters in the model L1, L2 Supervised
 Learning

Slide 29

Slide 29 text

? Data Model

Slide 30

Slide 30 text

Amazon EMR with Spark (MLib) Data Model

Slide 31

Slide 31 text

Data Scientists “Scalability”

Slide 32

Slide 32 text

Amazon
 Machine Learning
 (Amazon ML) Data Model

Slide 33

Slide 33 text

Amazon
 Machine Learning
 (Amazon ML) Data Model Batch Predictions

Slide 34

Slide 34 text

Amazon
 Machine Learning
 (Amazon ML) Data Model Batch Predictions Real-time Predictions

Slide 35

Slide 35 text

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)

Slide 36

Slide 36 text

...

Slide 37

Slide 37 text

Bike Sharing

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

All Users

Slide 41

Slide 41 text

All Users Casual Users Registered Users

Slide 42

Slide 42 text

...

Slide 43

Slide 43 text

What about Deep Learning?

Slide 44

Slide 44 text

Neural Networks Perceptron Layers

Slide 45

Slide 45 text

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

Slide 46

Slide 46 text

Neural Network Architectures http://www.asimovinstitute.org/neural-network-zoo/

Slide 47

Slide 47 text

Deep Learning AMI 5 Deep Learning Frameworks MXNet, Caffe, Tensorflow, Theano, and Torch Pre-installed components to speed productivity, such as Nvidia drivers, cuDNN, Anaconda, Python 2 & 3 AWS Integration R eady to use on A m azon EC 2

Slide 48

Slide 48 text

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 G PU Instances

Slide 49

Slide 49 text

What about interacting with devices in a more intuitive way, using voice?

Slide 50

Slide 50 text

No content

Slide 51

Slide 51 text

...

Slide 52

Slide 52 text

Create Great Content: ASK is how you connect
 to your consumer THE ALEXA ECOSYSTEM Supported by two powerful frameworks A L E X A 
 V O I C E 
 S E R V I C E Unparalleled Distribution: AVS allows your content
 to be everywhere Lives In The Cloud Automated Speech Recognition (ASR) Natural Language Understanding (NLU) Always Learning A L E X A 
 S K I L L S 
 K I T

Slide 53

Slide 53 text

UNDER THE HOOD OF ASK A closer look at how the Alexa Skills Kit process a request and returns an appropriate response You Pass Back a Textual or Audio Response You Pass Back a Graphical Response Alexa Converts Text-to-Speech (TTS) & Renders Graphical Component Respond to Intent through Text & Visual Alexa sends Customer Intent to Your Service User Makes a Request Alexa Identifies Skill & Recognizes Intent Through ASR & NLU Your Service processes Request Audio Stream is sent up to Alexa

Slide 54

Slide 54 text

ALEXA SKILL KIT High Level Overview Your Code

Slide 55

Slide 55 text

ALEXA SKILL KIT High Level Overview Amazon EC2

Slide 56

Slide 56 text

ALEXA SKILL KIT High Level Overview Availability Zone 1 Web tier App tier RDS (Master) Availability Zone 2 RDS (Standby)

Slide 57

Slide 57 text

ALEXA SKILL KIT High Level Overview Elastic Beanstalk environment Auto Scaling group Elastic Beanstalk container Auto Scaling group Elastic Beanstalk container Prod 1 Prod 2 Route 53

Slide 58

Slide 58 text

ALEXA SKILL KIT High Level Overview AWS Lambda

Slide 59

Slide 59 text

ALEXA SKILL KIT Voice Model Intents Utterances Slots

Slide 60

Slide 60 text

ALEXA SKILL KIT Voice Model Intents Utterances Slots

Slide 61

Slide 61 text

ALEXA SKILL KIT Voice Model Intents Utterances Slots

Slide 62

Slide 62 text

ALEXA SKILL KIT Voice Model Intents Utterances Slots

Slide 63

Slide 63 text

ALEXA SKILL KIT Typescript Code

Slide 64

Slide 64 text

ALEXA SKILL KIT Alexa App

Slide 65

Slide 65 text

...

Slide 66

Slide 66 text

Your Skill (Lambda function) Amazon Machine Learning get real-time predictions invoke Weather Forecast Historical Data get forecast build & train model B ike Sharing D em o A rchitecture

Slide 67

Slide 67 text

Build Apps With Services, Not Servers

Slide 68

Slide 68 text

aws.amazon.com/free developers.amazon.com

Slide 69

Slide 69 text

Thank you! @danilop @sebsto