Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Discover AI with Microsoft Azure

One day workshop

  • Be the first to comment

  • Be the first to like this

Discover AI with Microsoft Azure

  1. 1. AI Workshop Agenda
  2. 2. Vision Speech Language Microsoft AI breakthroughs
  3. 3. ImageNet ILSVRC Worldwide Industry Competition for Object Recognition 28,2 25,8 16,4 11,7 7,3 6,7 5,1 3.5 ILSVRC 2010 NEC America ILSVRC 2011 Xerox ILSVRC 2012 AlexNet ILSVRC 2013 Clarifi ILSVRC 2014 VGG ILSVRC 2014 GoogleNet Human Performance ILSVRC 2015 ResNet Microsoft Classification Error Rate (%) Microsoft Researchers win in all 5 entries of ImageNet 2015 Classification, Localization, Detection, COCO detection COCO segmentation fish? stone?
  4. 4. Microsoft’s speech breakthrough Microsoft researchers from the Speech & Dialogue research group 2017
  5. 5. Vision Speech Language Ongoing Momentum
  6. 6. a cb
  7. 7. • Easy • Roll your own with REST APIs • Simple to add: just a few lines of code required • Flexible • Make the same API code call on iOS, Android, and Windows • Integrate into the language and platform of your choice • Tested • Built by experts in their field from Microsoft Research, Bing, and Azure Machine Learning • Quality documentation, sample code, and community support
  8. 8. Create a seamless developer experience across desktop, cloud, or at the edge using Visual Studio AI Tools Bot services Infuse intelligence into your bot using cognitive services Speed development with a purpose-built environment for bot creation Integrate across multiple channels to reach more customers Cognitive services Map complex information and data Use pre-built AI services to solve business problems Allow your apps to process natural language Azure search Reduce complexity with a fully-managed service Get up and running quickly Use artificial intelligence to extract insights
  9. 9. Cognitive Services Emotion Computer Vision Face Video Speaker Recognition Speech Custom Recognition Translator Linguistic Analysis Language Understanding Bing Spell Check WebLM Text Analytics Entity Linking Knowledge Exploration Academic Knowledge Recommendations Bing Image Search Bing Video Search Bing Web Search Bing Autosuggest Bing News Search
  10. 10. Computer Vision API
  11. 11. Computer Vision API
  12. 12. Content of Image: Categories v0: [{ “name”: “animal”, “score”: 0.9765625 }] V1: [{ "name": "grass", "confidence": 0.9999992847442627 }, { "name": "outdoor", "confidence": 0.9999072551727295 }, { "name": "cow", "confidence": 0.99954754114151 }, { "name": "field", "confidence": 0.9976195693016052 }, { "name": "brown", "confidence": 0.988935649394989 }, { "name": "animal", "confidence": 0.97904372215271 }, { "name": "standing", "confidence": 0.9632768630981445 }, { "name": "mammal", "confidence": 0.9366017580032349, "hint": "animal" }, { "name": "wire", "confidence": 0.8946959376335144 }, { "name": "green", "confidence": 0.8844101428985596 }, { "name": "pasture", "confidence": 0.8332059383392334 }, { "name": "bovine", "confidence": 0.5618471503257751, "hint": "animal" }, { "name": "grassy", "confidence": 0.48627158999443054 }, { "name": "lush", "confidence": 0.1874018907546997 }, { "name": "staring", "confidence": 0.165890634059906 }] Describe 0.975 "a brown cow standing on top of a lush green field“ 0.974 “a cow standing on top of a lush green field” 0.965 “a large brown cow standing on top of a lush green field” Computer Vision API
  13. 13. Analyze image
  14. 14. OCR
  15. 15. Emotion API
  16. 16. Face API
  17. 17. Video Indexer
  18. 18. Custom Vision Service
  19. 19. Custom Vision Service Model
  20. 20. Custom Vision Services: Best Practices
  21. 21. Custom Vision Services: Example Scenarios
  22. 22. Translator API
  23. 23. Speech Translation Service Client app Translated text Translator
  24. 24. How Speech Translation works
  25. 25. Translate Speech - Close to real-time
  26. 26. Example of a speech translation method call
  27. 27. Speech API Application Flow
  28. 28. Microsoft Translator feature
  29. 29. Linguistic analysis
  30. 30. LUIS [Language Understanding Intelligent Service] Create your own LU model Train by providing examples Deploy to an HTTP endpoint and activate on any device Maintain model with ease
  31. 31. { “entities”: [ { “entity”: “flight_delays”, “type”: “Topic” } ], “intents”: [ { “intent”: “FindNews”, “score”: 0.99853384 }, { “intent”: “None”, “score”: 0.07289317 }, { “intent”: “ReadNews”, “score”: 0.0167122427 }, { “intent”: “ShareNews”, “score”: 1.0919299E-06 } ] } “News about flight delays” Language Understanding Models
  32. 32. Language Understanding Models
  33. 33. Text analytics
  34. 34. The Future Of Order Taking at McDonalds
  35. 35. Web language model
  36. 36. Spellcheck Word Breaks Slang HomonymsNames Brands
  37. 37. Spellcheck examples { "offset": 48, "token": "grate", "type": "UnknownToken", "suggestions": [ { "suggestion": "great", "score": "0.949079025281377" }] } { "offset": 23, "token": "Seattle. hope", "type": "UnknownToken", "suggestions": [ { "suggestion": "Seattle. Hope", "score": "0.875" }] } Hello Build! Welcome to Seattle. hope you have a grate week
  38. 38. Language understanding in human-computer interaction
  39. 39. Bing Search API v5 REST Enhanced Search and Filtering Capabilities Ongoing Improvements and Support Web- Scale High Performance Secure (HTTPs)
  40. 40. *screenshots show actual search results on { “_type”: “SearchResponse”, “queryContent”: {…}, “webPages”: {…}, “news”: {…}, “images”: {…}, “videos”: {…}, “relatedSearches”: {…}, “rankingResponse”: {…} } { “answerType”:”WebPages”, “resultIndex”:0,… }, { “answerType”:”News”, “resultIndex”:1,… } Ranking Response Search Response Web Results Deep Links (1st Algo) News Results Image Results Video Results Related Searches Web Search API
  41. 41. Vertical Search APIs • Enhanced metadata and filters (size, license, style, freshness, color) • Image insights (entity recognition, visually similar) source: • Enhanced metadata and filters (price, resolution, length, freshness) • Motion thumbnails (video preview) source: • News by category/market, and trending news • Rich article metadata (featured entities) News Search API source:
  42. 42. Accessing the APIs GET HTTP/1.1 OCP-Apim-Subscription-Key: <API KEY>
  43. 43. nl/services/cognitive-services/
  44. 44. services/text-analytics/
  45. 45.
  46. 46. Text Speech Image Dynamics365 On-premises IFTTT Speech Language understanding Translator QnA Maker Bing search Start State 2 State 3 State 1 Bot framework SDK dialog manager Dispatch
  47. 47. Domain specific pretrained models To reduce time to market LanguageSpeech … SearchVision Powerful infrastructure To accelerate deep learning CPU GPU FPGA PyCharm Jupyter Familiar Data Science tools To simplify model development Visual Studio Code Command line Popular frameworks To build advanced deep learning solutions TensorFlowPytorch OnnxScikit-Learn Azure Databricks Machine Learning VMs Azure Machine Learning Productive services To empower data science and development teams From the Intelligent Cloud to the Intelligent Edge
  48. 48. Azure AI Platform – Machine Learning Easily build, deploy, and share predictive analytics solutions • Simple, scalable, cutting edge. A fully managed cloud service that enables you to easily build, deploy, and share predictive analytics solutions. • Deploy in minutes. Azure Machine Learning means business. You can deploy your model into production as a web service that can be called from any device, anywhere and that can use any data source. • Publish, share, monetize. Share your solution with the world in the Gallery or on the Azure Marketplace. Machine Learning and Analytics HDInsight (Hadoop and Spark) Stream Analytics Data Lake Analytics Machine Learning
  50. 50. Vision Computer Vision | Video Indexer | Face | Content Moderator Speech … Speech to Text | Text to Speech | Speech Translation | Speaker Recognition Language Text Analytics | Spell Check | Language Understanding | Text Translation | QnA Maker Bing Search Big Web Search | Video Search | Image Search | Visual Search | Entity Search | News Search | Autosuggest
  51. 51. PyCharm Jupyter Visual Studio Code Command lineZeppelin Interactive widgets for Jupyter Notebooks Azure Machine Learning for Visual Studio Code extension
  52. 52. What is Machine Learning?
  53. 53. What is Machine Learning? Machine Learning is a process by which computers find patterns in data Makes those patterns available to applications. Application can then gain insights on new data based on conformity to the identified patterns.
  54. 54. Why Machine Learning? Enables you to learn from data faster than humans and make decisions on new events. Power of ML comes from the information that we can extract from existing data in the system. Enables to find patterns that are not obvious to humans. It can self adapt to new events.
  55. 55. Machine Learning Applications
  56. 56. Microsoft & Machine Learning Bing maps launches What’s the best way to home? Kinect launches What does that motion “mean”? Azure Machine Learning What will happen next? Hotmail launches Which email is junk? Bing search launches Which searches are most relevant? Skype Translator launches What is that person saying? 201420091997 201520102008
  57. 57. Machine Learning Examples: Image Analyze
  58. 58. Machine Learning Examples: Which border color is the best?
  59. 59. Machine Learning Examples: Which border color is best?
  60. 60. Machine Learning Examples: Text Analytics - User reviews Positive Negative
  61. 61. What is Machine Learning?
  62. 62. Two main types of Machine Learning problems
  63. 63. Supervised learning
  64. 64. Regression versus Classification Regression problems • Estimate household power consumption • Estimate customer’s income Classification problems • Power station will / will not meet demand • Customer will respond to advertising
  65. 65. Common Classes of Algorithms Classification Regression Anomaly Detection Clustering
  66. 66. Identifying to which of a set of categories (sub-populations) a new observation belongs, on the basis of a training set of data containing observations (or instances) whose category membership is known. Classification A set of statistical processes for estimating the relationships among variables. It includes many techniques for modeling and analyzing several variables, when the focus is on the relationship between a dependent variable and one or more independent variables (or 'predictors’). Regression The task of grouping a set of objects in such a way that objects in the same group (called a cluster) are more similar (in some sense) to each other than to those in other groups (clusters). Clustering The identification of items, events or observations which do not conform to an expected pattern or other items in a dataset. Typically the anomalous items will translate to some kind of problem such as bank fraud, a structural defect, medical problems or errors in a text. Anomaly Detection Common Classes of Algorithms
  67. 67. Supervised vs Unsupervised Learning Unsupervised Learning • Unlabeled Data • Clustering (K-means) • Market Basket Analysis (Apriori Algorithm) • Anomaly Detection (Extreme Studentized Deviate Test) • Text mining (Latent Dirichlet Allocation) Supervised learning • Labeled Data • Anomaly Detection (Support Vector Machine) • Text mining (Support Vector Machine) • Regression (Linear Regression) • Classification (Random Forest) • Sentiment analysis (Neural Network)
  68. 68. Which algorithm to use?
  69. 69. Regression Regression
  70. 70. 50°F 30°F 68°F 95°F1990 48°F 29°F 70°F 98°F2000 49°F 27°F 67°F 96°F2010 ? ? ? ?2020 … … … …… Known data Model Unknown data Weather forecast sample Using known data, develop a model to predict unknown data.
  71. 71. 90°F -26°F 50°F 30°F 68°F 95°F1990 48°F 29°F 70°F 98°F2000 49°F 27°F 67°F 96°F2010 Using known data, develop a model to predict unknown data. Predict 2020 Summer
  72. 72. Classification Classification
  73. 73. Binary versus Multiclass Classification Multiclass examples • kind of tree • kind of network attack • type of heart disease Binary examples • click prediction • yes|no • over|under • win|loss
  74. 74. Example of a Classification Model (Decision Tree) Age<30 Income > $50K Xbox-One Customer Not Xbox-One Customer Days Played > 728 Income > $50K Xbox-One Customer Not Xbox-One Customer Xbox-One Customer
  75. 75. Which algorithm to use?
  76. 76. Unsupervised learning - Clustering
  77. 77. Clustering Clustering
  78. 78. Choosing the right k…
  79. 79. Machine Learning Algorithms
  80. 80. Data Science Process 20% of work • Perform Statistical analysis • Discover and handle outliers • Prepare a list of predictive model techniques • Clearly defined business problem • Set success criteria • Define clear data science objectives • Break business problems to data science problems • Identify machine learning problem categories • Understand data points and constraints • Formulate data analytics strategy • Perform required transformation • Experiment with multiple models • Choose the optimal model • Create a feedback loop Define Business Problem Map to Machine Learning Problem Data Preparation Exploratory Data Analysis Modeling Evaluation 80% of work
  81. 81. Build a Machine Learning Solution Politics Sports Tech Health Using known data, develop a model to predict unknown data.
  82. 82. Build a Machine Learning Solution Using known data, develop a model to predict unknown data. Documents Labels Tech Health Politics Politics Sports Documents consist of unstructured text. Machine learning typically assumes a more structured format of examples
  83. 83. Build a Machine Learning Solution Using known data, develop a model to predict unknown data. LabelsDocuments Feature Documents Labels Tech Health Politics Politics Sports
  84. 84. Build a Machine Learning Solution Known data Data instance {40, (180, 82), (11,7), 70, …..} : Healthy Age Height/Weight Blood Pressure Hearth Rate LabelFeatures Feature Vector
  85. 85. Build a Machine Learning Solution Using known data, develop a model to predict unknown data. Documents Labels Tech Health Politics Politics Sports Training data Train the Model Feature Vectors Base Model Adjust Parameters
  86. 86. Build a Machine Learning Solution Known data with true labels Tech Health Politics Politics Sports Tech Health Politics Politics Sports Tech Health Politics Politics Sports Model’s Performance Difference between “True Labels” and “Predicted Labels” True labels Tech Health Politics Politics Sports Predicted labels Train the Model Split Detach +/- +/- +/-
  87. 87. Example use cases
  88. 88. Microsoft Azure Machine Learning Studio
  89. 89. Overview of the labs
  90. 90. Hands On Lab 1: Predict Employee Leave (Classification)
  91. 91. Hands On Lab 2: Predict Annual Income (Classification)
  92. 92. Azure Notebooks
  93. 93. Azure Notebooks
  94. 94. Python Kernel
  95. 95. Azure Notebooks – Azure Integration Your Azure Subscription is fully integrated into Azure Notebooks • Create a private notebook service for users of your Azure Subscription • Create custom Docker images to run your notebooks • Use premium computing resources to run your notebook (more cores, more RAM, GPU). • Always-free compute tier available Your Azure Subscription credentials available for single-sign-on • Use Azure data resources (e.g., SQL Azure, Cosmos DB, Azure Blob and Table storage) without needing to embed credentials in your notebooks • Use Azure compute resources (e.g., Azure Batch, Azure Batch AI, Azure Machine Learning) without needing to embed credentials in your notebooks
  96. 96. Quick Walkthrough of Azure Notebooks
  97. 97. Sign in and Create an ID
  98. 98. Azure Notebooks - Projects Use this to: Create New Projects Upload OR Clone from GitHub Migrate (Upload) a local Jupyter notebook Share your Notebook
  99. 99. Azure Notebook - Editor View
  100. 100. Azure Notebooks – Toolbar and Shortcuts Mode What Shortcut Command (Press Esc to enter) Run cell Shift-Enter Command Add cell below B Command Add cell above A Command Delete a cell d-d Command Go into edit mode Enter Edit (Press Enter to enable) Run cell Shift-Enter Edit Indent Clrl-] Edit Unindent Ctrl-[ Edit Comment section Ctrl-/ Edit Function introspection Shift-Tab
  101. 101. Hands On Lab 3: Predict Flight Delay (Classification) %20-%20Machine%20Learning%20in%20Python
  102. 102. Hands On Lab 4: Bike Rental Challenge
  103. 103. If You Have Some Time Left… %20Learning
  104. 104. Microsoft Offer for Students
  105. 105. Lab Tool Resources Quick Start Tutorial Tutorial Data Scientist Guide Quick guide Tutorial Run Azure Notebook with Python Sample Notebooks
  106. 106. Other Azure ML Examples DoingMachineLearningwithAzureMLStudio/tree/master/instructor_resources Image clustering using Python and Azure Machine Learning Studio Workshop Azure ML Studio v1:Microsoft+DAT275x+2018_T4/about
  107. 107. Other Azure ML Examples
  108. 108. ?