12 Lecture Week 13 Practical Machine Learning on AWS PDF
Document Details
Uploaded by EvocativeTiger
Tags
Related
Summary
This document discusses practical machine learning techniques on Amazon Web Services (AWS). It details the AWS ML stack, its capabilities, and its potential uses in various scenarios. The presentation includes high-level information on various AWS services and their applications in AI and related fields.
Full Transcript
Our mission at AWS Put machine learning in the hands of every developer © 2019, Amazon Web Services, Inc. or its Affiliates....
Our mission at AWS Put machine learning in the hands of every developer © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Trademark Why AWS for AI? Broadest and deepest Accelerate your adoption Built on the most set of AI and ML of ML with SageMaker comprehensive cloud platform services optimized for ML 200 new features & services 70% cost reduction in data-labeling AWS holds the top spots on launched this last year alone 10x faster performance Stanford’s benchmark, for fastest training time, lowest cost, lowest Unmatched flexibility 75% lower inference cost inference latency © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Trademark More machine learning happens on AWS than anywhere else 10,000+ customers | 2x the customer references | 85% of TensorFlow projects in the cloud happen on AWS © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Trademark Bringing AI into your digital Technology transformation requires a new “stack” that makes it easier to put ML to work © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Trademark The Amazon ML stack: Broadest & deepest set of capabilities AI Services ML Services F R A M EW O R K S INTERFACES I N F R A ST R U CTU R E ML Frameworks + Infrastructure EC2 P3 EC2 EC2 FPGAs Greengrass Elastic Inferentia & P3dn G4 C5 inference © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Trademark The Amazon ML stack: Broadest & deepest set of capabilities AI Services ML Services Amazon Reinforcement SageMaker Ground Truth Notebooks Algorithms + Marketplace Training Optimization Deployment Hosting Learning F R A M EW O R K S INTERFACES I N F R A ST R U CTU R E ML Frameworks + Infrastructure EC2 P3 EC2 EC2 FPGAs Greengrass Elastic Inferentia & P3dn G4 C5 inference © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Trademark Amazon SageMaker BRINGING MACHINE LEARNING TO ALL DEVELOPERS Collect and Choose and Set up and Train and tune model Deploy model Scale and manage prepare optimize your manage (trial and error) in production the production training data ML algorithm environments environment for training © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Trademark Amazon SageMaker BRINGING MACHINE LEARNING TO ALL DEVELOPERS Pre-built notebooks for common problems Choose and Set up and Train and tune model Deploy model Scale and manage C o l l e c t a n d optimize your manage (trial and error) in production the production p r e p a r e t r a i n i n g d a t a ML algorithm environments environment for training © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Trademark Amazon SageMaker BRINGING MACHINE LEARNING TO ALL DEVELOPERS K-Means Clustering Pre-built Built-in, high Principal Component Analysis notebooks for performance Neural Topic Modelling common problems algorithms Factorization Machines Linear Learner (Regression) BlazingText Reinforcement learning XGBoost Topic Modeling (LDA) Image Classification Seq2Seq Train and tune model Deploy model Scale and manage C o l l e c t a n d C h o o s e a n d (trial and error) in production the production Linear Learner (Classification) p r e p a r e o p t i m i z e y o u r t r a i n i n g d a t a M L a l g o r i t h m DeepAR Forecasting environment © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Trademark Amazon SageMaker BRINGING MACHINE LEARNING TO ALL DEVELOPERS Pre-built Built-in, high One-click notebooks for performance training common problems algorithms Train and tune model Deploy model Scale and manage C o l l e c t a n d C h o o s e a n d Set up and manage (trial and error) in production the production p r e p a r e o p t i m i z e y o u r environments t r a i n i n g d a t a M L a l g o r i t h m for training environment © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Trademark Amazon SageMaker BRINGING MACHINE LEARNING TO ALL DEVELOPERS Pre-built Built-in, high One-click Optimization notebooks for performance training common problems algorithms Deploy model Scale and manage C o l l e c t a n d C h o o s e a n d Set up and manage Train and tune model in production the production p r e p a r e o p t i m i z e y o u r environments (trial and error) t r a i n i n g d a t a M L a l g o r i t h m for training environment © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Trademark Amazon SageMaker BRINGING MACHINE LEARNING TO ALL DEVELOPERS Pre-built Built-in, high One-click Optimization One-click notebooks for performance training deployment common problems algorithms Scale and manage C o l l e c t a n d C h o o s e a n d Set up and manage Train and tune model Deploy model the production p r e p a r e o p t i m i z e y o u r environments (trial and error) in production t r a i n i n g d a t a M L a l g o r i t h m for training environment © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Trademark Amazon SageMaker BRINGING MACHINE LEARNING TO ALL DEVELOPERS F u l l y m a n a g e d Pre-built Built-in, high One-click Optimization One-click w i t h a u t o - notebooks for performance training deployment s c a l i n g , h e a l t h common problems algorithms c h e c k s , a u t o m a t i c h a n d l i n g o f n o d e f a i l u r e s , a n d s e c u r i t y c h e c k s C o l l e c t a n d C h o o s e a n d Set up and manage Train and tune model Deploy model S c a l e a n d p r e p a r e o p t i m i z e y o u r environments (trial and error) in production m a n a g e t h e t r a i n i n g d a t a M L a l g o r i t h m for training p r o d u c t i o n e n v i r o n m e n t © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Trademark The Amazon ML stack: Broadest & deepest set of capabilities V I SI O N SP EEC H LANGUAGE C H A T BO T S F O R E C A ST I N G RECOMMENDATIONS AI Services REKOGNITION REKOGNITION TEXTRACT POLLY TRANSCRIBE TRANSLATE COMPREHEND LEX FORECAST PERSONALIZE IMAGE VIDEO ML Services Amazon Reinforcement SageMaker Ground Truth Notebooks Algorithms + Marketplace Training Optimization Deployment Hosting Learning F R A M EW O R K S INTERFACES I N F R A ST R U CTU R E ML Frameworks + Infrastructure EC2 P3 EC2 EC2 FPGAs Greengrass Elastic Inferentia & P3dn G4 C5 inference © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Trademark © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Trademark Put AI to work for your business Modernize your contact center to improve customer service conversational chat bots | call transcription | intelligent routing | sentiment analysis | VoC analytics text-to speech | multilingual omni-channel communication P O L L Y T R A N S C R I B E T R A N S L A T E C O M P R E H E N D L E X © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Trademark AWS Rekognition Definition: AWS Rekognition is a cloud- based service that uses machine learning to analyze images and videos. Key Features: Facial recognition Object and scene detection Text recognition Video analysis Custom label training How AWS recognition works 1.Input: Upload images or videos. 2.Processing: Rekognition analyzes the media using pre-trained or custom ML models. 3.Output: Get results like detected objects, faces, or extracted text via API responses. Use cases examples Security and Surveillance: Facial recognition for identity verification. Content Moderation: Detect inappropriate or unsafe content. Retail and E-commerce: Personalized recommendations based on image recognition. Media and Entertainment: Automated tagging for large media libraries. Healthcare: Analyze medical images for insights. Benefits of AWS Rekognition Scalability: Automatically scales to handle varying workloads. Accuracy: Leverages state-of-the-art machine learning models. Integration: Easily integrates with other AWS services (e.g., S3, Lambda, DynamoDB). Cost-Effectiveness: Pay-as-you-go pricing model. Customization: Train custom models for specific business needs. Getting Started using Rekognition 1.Set Up AWS Account: Sign in to your AWS Management Console. 2.Upload Media: Use S3 to store your images or videos. 3.Use API: Call Rekognition API for analysis. 4.View Results: Process and visualize results in your application. Visual: Screenshot of AWS Rekognition console Custom label training Rekognition Custom Labels is a feature of AWS Rekognition that allows users to train machine learning models for image analysis tailored to specific use cases. Unlike Rekognition's pre-trained models, which identify common objects, faces, and text, Custom Labels enables you to detect unique objects or patterns relevant to your business needs. Example Use Cases: Agriculture: Identify crop diseases or monitor growth stages. Manufacturing: Detect defective products on an assembly line. Retail: Classify and tag custom products for cataloging. Healthcare: Recognize medical conditions in specialized imaging. pricing Free Tier: Analyze 5,000 images per month for the first 12 months. Standard Pricing: $1 per 1,000 images analyzed. $0.12 per minute of video. Custom Labels: Separate pricing based on training and usage. Example using AWS recognition custom label training to identify fruits in a garden https://aws.amazon.com/blogs/machine-learning/use-computer- vision-to-measure-agriculture-yield-with-amazon-rekognition-custom- labels/ Example using AWS rekognition https://aws.amazon.com/blogs/machine-learning/build-your-own- face-recognition-service-using-amazon-rekognition/ Demo using AWS Rekognition API call AWS comprehend What is AWS Comprehend? Definition: AWS Comprehend is a natural language processing (NLP) service that uses machine learning to extract insights from text. Key Features: Sentiment analysis Entity recognition Keyphrase extraction Topic modeling Custom classification Language detection How it Works 1.Input: Provide text data. 2.Processing: Comprehend applies pre-trained NLP models or custom models. 3.Output: Receive structured insights like sentiments, entities, and more via API responses. Example https://docs.aws.amazon.com/comprehend/latest/dg/tutorial-reviews- analysis.html USE cases for AWS comprehend Customer Feedback Analysis: Analyze product reviews or survey responses for sentiment and themes. Content Categorization: Organize large volumes of text into relevant categories. Fraud Detection: Identify suspicious patterns in text data. Healthcare: Extract medical terms and insights from clinical notes. Social Media Monitoring: Track brand mentions and sentiment. Benefits of AWS Comprehend Accurate Insights: Built on advanced machine learning models. Scalable: Processes large volumes of text effortlessly. Customizable: Train custom models tailored to specific business needs. Integration: Works seamlessly with other AWS services like S3, Lambda, and DynamoDB. Ease of Use: No prior NLP expertise required. Visual: Comparison chart showcasing benefits Getting Started 1.Set Up AWS Account: Log in to the AWS Management Console. 2.Provide Text Data: Upload data or use real-time text streams. 3.Choose Analysis Type: Select predefined tasks (e.g., sentiment analysis) or custom models. 4.View Results: Receive insights via the console or API responses. Pricing Overview Free Tier: Analyze up to 50,000 units of text monthly for the first 12 months. Standard Pricing: $0.0001 per unit of text analyzed. Custom model training costs vary by dataset size. SUCCESS story using AWS comprehend FINRA is a not-for-profit organization dedicated to investor protection and market integrity. FINRA receives millions of documents with unstructured data to support investigative, examination, and compliance processes. Our investigators and examiners had to manually go through documents page by page or run very targeted searches to find what they needed. With Amazon Comprehend, we can quickly extract individuals and organization, match extracted entities to FINRA records, flag individual of interest, and detect similarities with other documents. Use case of AWS comprehend medical Example of using Amazon AI services What is AWS Polly? Definition: AWS Polly is a cloud-based text-to-speech (TTS) service that uses advanced deep learning technologies to convert text into natural-sounding speech. Key Features: Multiple languages and voices Neural TTS for improved voice quality Real-time streaming Custom lexicons for pronunciation control Speech Marks for synchronization with animations How it Works 1.Input: Provide text data via console or API. 2.Processing: Polly processes text using advanced TTS models. 3.Output: High-quality audio streams or files in various formats. Key use cases Customer Support: Interactive voice response (IVR) systems. Content Creation: Generate voiceovers for videos, e-learning, or audiobooks. Accessibility: Enable screen readers or assistive devices for visually impaired users. IoT Devices: Add natural-sounding speech to smart devices. Gaming: Create dynamic and immersive character dialogues. Benefits of AWS Polly Natural-Sounding Voices: Enhanced by Neural TTS technology. Real-Time Capability: Generate speech instantly for dynamic use cases. Language Diversity: Support for numerous languages and dialects. Customizable: Tailor pronunciation and tone with custom lexicons and SSML. Scalable: Handle workloads from single utterances to large-scale deployments. ssml SSML, or Speech Synthesis Markup Language, is a standard markup language used to control various aspects of text-to-speech (TTS) synthesis. It enables developers to enhance the spoken output by providing instructions on how the text should be pronounced or formatted when converted to speech. SSML Pronunciation Control: Define how words or acronyms should be pronounced.Example: engine. Speech Rate, Pitch, and Volume: Adjust the speed, tone, and loudness of the speech.Example: Hello, world!. Pauses and Breaks: Insert pauses of specific lengths for natural pacing.Example: Benefits of Using SSML: Enhanced Naturalness: Improves the clarity and expressiveness of speech output. Flexibility: Offers fine-grained control over speech synthesis. Accessibility: Makes text-to-speech applications more user-friendly. AWS polly support AWS Polly fully supports SSML, allowing developers to leverage these capabilities to create dynamic and engaging speech experiences. Getting Started with polly 1.Set Up AWS Account: Access the AWS Management Console. 2.Input Text: Enter text or upload files via console or API. 3.Select Voice: Choose from standard or neural voices. 4.Download Audio: Export audio in the desired format. Pricing Overview Free Tier: Convert up to 5 million characters per month for the first 12 months. Standard Pricing: $4 per 1 million characters for standard voices. $16 per 1 million characters for neural voices. What is AWS Transcribe? Definition: AWS Transcribe is a fully managed speech-to-text service that uses automatic speech recognition (ASR) to convert audio to text. Key Features: Real-time and batch transcription Automatic punctuation and formatting Custom vocabulary for domain-specific terms Speaker identification (speaker diarization) Channel identification for multi-channel audio How it Works 1.Input: Provide audio data via console or API. 2.Processing: Transcribe applies ASR models to generate text. 3.Output: Receive structured text with speaker and channel information. Key Use Cases Customer Support: Transcribe and analyze call center conversations. Content Captioning: Generate subtitles for videos and podcasts. Healthcare: Document doctor-patient interactions with medical transcription. Legal: Convert courtroom or deposition recordings into accurate transcripts. Education: Provide transcription for recorded lectures and webinars. Benefits of AWS transcribe Accurate Transcriptions: Enhanced with advanced machine learning models. Real-Time Capability: Supports live transcription for dynamic needs. Customizable: Add industry-specific terms with custom vocabulary. Speaker Identification: Recognizes multiple speakers for better organization. Scalable: Handles workloads of any size with ease. Use case AWS transcribe The FORMULA 1 (F1) Amazon Transcribe is a powerful tool; it performs transcription with incredibly high accuracy, which grows every day. F1’s use-case was extremely challenging; the combination of incredibly high speed and dynamic commentary from multiple contributors, a global vocabulary and niche technical terminology. Working in close collaboration with AWS, we built and trained a scalable subtitling solution with accuracy and performance that matches human Closed Captioners. Deliveroo (use case AWS transcribe) Deliveroo has built a successful food delivery business by meeting customer needs quickly. Deliveroo also uses ML and artificial intelligence (AI) tools powered by data to provide a better experience in its contact center. Amazon Connect, an omnichannel cloud contact center, integrates with Amazon Transcribe to automatically convert speech to text. That text can then be analyzed using Contact Lens for Amazon Connect to better understand the reasons customers are calling and any snags in the Deliveroo care experience, allowing the company to improve its practices. Aws connect contact lens integration with transcribe What is AWS Lex? Definition: AWS Lex is a service for building conversational interfaces into any application using voice and text. Key Features: Automatic Speech Recognition (ASR) for converting speech to text. Natural Language Understanding (NLU) to recognize the intent of the text. Multi-language support. Seamless integration with AWS Lambda and other AWS services. Pre-built integrations with messaging platforms. Steps for creation 1.Define Bot: Create intents, sample utterances, and responses. 2.Integrate: Connect the bot with applications or platforms (e.g., chat apps, websites). 3.Deploy: Publish and scale the bot as needed. 4.Learn: Use analytics to improve bot performance over time. Key Use Cases Customer Support: Build intelligent virtual assistants for handling FAQs. E-commerce: Provide voice- or text-based shopping assistants. Healthcare: Automate appointment scheduling and patient interactions. Banking: Enable secure, conversational banking. IoT Devices: Voice-enable smart devices. Benefits of AWS Lex Ease of Use: Simple console and APIs for quick setup. Scalability: Automatically scales to handle high volumes. Cost-Effective: Pay only for what you use. Integration: Works seamlessly with AWS Lambda for backend logic. Customizability: Tailor conversations to fit business needs. Getting Started 1.Set Up AWS Account: Access the AWS Management Console. 2.Define Intents: Specify what the bot should do. 3.Train and Test: Input sample utterances and validate the bot’s understanding. 4.Deploy Bot: Publish and integrate the bot with desired platforms. Pricing Overview Free Tier: 10,000 text requests and 5,000 speech requests per month for the first year. Standard Pricing: $0.004 per text request. $0.075 per minute for speech requests. What is Amazon Kendra? Definition: Amazon Kendra is an intelligent search service powered by machine learning to help organizations find accurate answers from their unstructured data. Key Features: Natural language search queries Built-in connectors for various data sources Relevance tuning for customization Secure access control Incremental learning to improve results over time Wall street journal success story using kendra How it Works 1.Data Integration: Connect data sources using pre-built connectors or custom APIs. 2.Indexing: Amazon Kendra indexes the data to create a searchable knowledge base. 3.Search Queries: Users query in natural language or keywords. 4.Results: Kendra provides highly relevant and ranked answers. Key Use Cases Customer Support: Enable faster query resolution by providing agents with quick access to relevant information. Human Resources: Allow employees to search for policies, benefits, and internal documents. Healthcare: Provide researchers with quick answers from medical and research documents. E-commerce: Improve customer experience with intelligent product search. Education: Help students and faculty find course materials and resources quickly. Benefits of Amazon Kendra Natural Language Understanding: Users can ask questions naturally, improving accessibility. Improved Efficiency: Reduces time spent searching for information. Customizable: Adjust relevance to align with organizational priorities. Secure and Scalable: Ensures data security while scaling to meet demand. Multi-Source Integration: Supports diverse data sources like SharePoint, S3, Salesforce, and more. Getting Started 1.Set Up AWS Account: Access the AWS Management Console. 2.Connect Data Sources: Use pre-built connectors or APIs to link your data. 3.Create an Index: Let Kendra process and index your content. 4.Query and Optimize: Start querying and fine-tune relevance settings. Pricing Overview Free Tier: Includes up to 30,000 queries per month for the first 30 days. Standard Pricing: Based on the number of indexes and query requests. Additional charges for data storage and custom connectors. What is Amazon Textract? Definition: Amazon Textract is a machine learning service that automatically extracts text, handwriting, and data from scanned documents. Key Features: Optical Character Recognition (OCR) Extraction of structured data (tables, forms) Support for handwritten text recognition Integration with AWS services (e.g., Lambda, S3, Comprehend) Secure and scalable How it Works 1.Upload Document: Store the document in Amazon S3 or provide it directly to the API. 2.Process: Textract uses machine learning to analyze and extract data. 3.Output: Receive text and structured data in JSON format. usage Document Automation: Automate the processing of forms, invoices, and receipts. Data Analysis: Extract structured data for analytics and reporting. Compliance: Streamline compliance with document verification. Healthcare: Digitize patient records for improved accessibility. Legal: Extract and organize contracts and legal documents. Benefits of Amazon Textract Accurate Text Extraction: High accuracy for text and structured data. Automation: Reduces manual document processing time. Flexible Integration: Easily integrates with existing AWS workflows. Secure: Built with enterprise-grade security and compliance. Scalable: Handles large volumes of documents seamlessly. Getting Started 1.Set Up AWS Account: Log in to the AWS Management Console. 2.Upload Documents: Use S3 or provide files via API. 3.Analyze Documents: Call Textract APIs to process documents. 4.Process Output: Use JSON responses to integrate extracted data. Pricing Overview Free Tier: Includes 1,000 pages per month for the first three months. Standard Pricing: $0.0015 per page for text extraction. Additional charges for table and form data extraction. Amazon personalize What is Amazon Personalize? Definition: Amazon Personalize is a machine learning service that enables developers to build applications with personalized recommendations, search results, and targeted marketing. Key Features: Real-time personalization Pre-built machine learning models Integration with multiple data sources Secure and scalable Easy integration with applications How it Works 1.Data Preparation: Upload datasets such as user activity logs, item catalogs, or demographic information to Amazon S3. 2.Create Dataset Group: Organize data for specific use cases (e.g., recommendations or personalization). 3.Train Models: Use AutoML or custom configurations to train models tailored to the dataset. 4.Deploy Models: Host the model and integrate it into your application. 5.Real-Time Recommendations: Query the deployed model for personalized outputs. Key Use Cases E-Commerce: Provide product recommendations to customers based on browsing and purchase history. Media & Entertainment: Recommend content such as movies, songs, or articles based on user preferences. Retail: Deliver personalized promotions and offers to increase customer engagement. Education: Customize learning experiences for students based on performance and preferences. Healthcare: Tailor wellness programs to individual patient needs. Benefits of Amazon Personalize High Accuracy: Uses advanced ML techniques for precise recommendations. Fast Deployment: Pre-built algorithms reduce development time. Real-Time Personalization: Adapts to user behavior dynamically. Scalable: Supports large-scale personalization needs. Integration: Works seamlessly with AWS and third-party systems. Pricing Overview Free Tier: 20 free training hours per month for the first two months. Standard Pricing: Based on training hours, data storage, and inference requests. Scales with usage and data volume. Example merging using several AWS AI services https://aws.amazon.com/blo gs/machine-learning/build- your-own-real-time-voice- translator-application-with- aws-services/ https://github.com/tstachlew ski/voice-translator- app/blob/master/lambda/java- project/src/main/java/app/bab elfish/LambdaHandler.java