Machine Learning for Developers

Machine Learning for Developers

Devoxx Belgium, Antwerp, November 10th, 2016

Have you always wanted to add predictive capabilities or voice recognition to your application, but haven’t been able to find the time or the right technology to get started? Everybody wants to build smart apps, but only a few are Data Scientists. We had the same issue inside Amazon, so we created a Machine Learning engine that Developers can easily use. The same approach is now available in the AWS cloud. And we introduced Amazon Alexa to build engaging voice experiences for your services and devices: if you are a device maker, and your connected product has a microphone and a speaker, the Alexa Voice Service (AVS) enables you to add voice-powered experiences to your connected devices. And you can also use the Alexa Skills Kit (ASK) to teach new skills to Alexa!

7c9b8b368924556d8642bdaed3ded1f5?s=128

Danilo Poccia

November 10, 2016
Tweet

Transcript

  1. Machine Learning for Developers Danilo Poccia Technical Evangelist, AWS @danilop

    Sébastien Stormacq Solution Architect, Alexa @sebsto
  2. 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
  3. 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/

  4. 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

  5. Batch Report

  6. Batch Report Real-time Alerts

  7. Batch Report Real-time Alerts Prediction Forecast

  8. Predictions

  9. Data Predictions

  10. Model Data Predictions

  11. Model

  12. Machine Learning

  13. 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
  14. Reinforcement Learning Perform a certain goal in a dynamic environment,

    without an explicit “teacher”
  15. Driving a vehicle Playing a game
 against an opponent R

    einforcem ent Learning
  16. Clustering U nsupervised
 Learning

  17. Clustering U nsupervised
 Learning

  18. Clustering U nsupervised
 Learning

  19. Regression Binary Classification Multi-class Classification Supervised
 Learning

  20. Validation Supervised
 Learning

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

  22. Training the Model Minimizing the Error Function Supervised
 Learning

  23. Be Careful of Overfitting Supervised
 Learning

  24. Be Careful of Overfitting Supervised
 Learning

  25. Be Careful of Overfitting Supervised
 Learning

  26. Better Model, Different Predictions Supervised
 Learning

  27. Supervised
 Learning Better Model, Different Predictions

  28. Regularization Adding a “cost” for using
 large parameters in the

    model L1, L2 Supervised
 Learning
  29. ? Data Model

  30. Amazon EMR with Spark (MLib) Data Model

  31. Data Scientists “Scalability”

  32. Amazon
 Machine Learning
 (Amazon ML) Data Model

  33. Amazon
 Machine Learning
 (Amazon ML) Data Model Batch Predictions

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

    Predictions
  35. 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)
  36. <demo> ... </demo>

  37. <demo> Bike Sharing </demo>

  38. None
  39. None
  40. All Users

  41. All Users Casual Users Registered Users

  42. <demo> ... </demo>

  43. What about Deep Learning?

  44. Neural Networks Perceptron Layers

  45. 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

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

  47. 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
  48. 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
  49. What about interacting with devices in a more intuitive way,

    using voice?
  50. None
  51. <demo> ... </demo>

  52. 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
  53. 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
  54. ALEXA SKILL KIT High Level Overview Your Code

  55. ALEXA SKILL KIT High Level Overview Amazon EC2

  56. ALEXA SKILL KIT High Level Overview Availability Zone 1 Web

    tier App tier RDS (Master) Availability Zone 2 RDS (Standby)
  57. 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
  58. ALEXA SKILL KIT High Level Overview AWS Lambda

  59. ALEXA SKILL KIT Voice Model Intents Utterances Slots

  60. ALEXA SKILL KIT Voice Model Intents Utterances Slots

  61. ALEXA SKILL KIT Voice Model Intents Utterances Slots

  62. ALEXA SKILL KIT Voice Model Intents Utterances Slots

  63. ALEXA SKILL KIT Typescript Code

  64. ALEXA SKILL KIT Alexa App

  65. <demo> ... </demo>

  66. 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
  67. Build Apps With Services, Not Servers

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

  69. Thank you! @danilop @sebsto