O documento apresenta uma introdução ao machine learning com a Amazon Web Services. Aborda conceitos como tipos de machine learning, treinamento de modelos, importância dos dados e serviços da AWS para machine learning como Amazon Rekognition, Amazon Comprehend e Amazon Translate.
Let’s say your company wants to send marketing offers to potential customers on this toy helicopter, and you have been tasked to come up with a system to identify whom to target for the marketing campaign.
Now, how would you do it?
For many of us, we can just hand design rules and code these rules into the application logic. For example, we can create rules around age, purchase history, gender and so on so forth, and will just process the inputs based on these rules.
This could definitely work when the rules and the number of data dimension are well understood and manageable. However, since human are involved in creating the rules here, there is a chance for error and biases being introduced into the rules.
Additionally when the rules become complex and large and there are consistent changes, then this rule based approach starts to have some serious limitations.
So what are some main limitation with hand designed rules?
The first problem is scalability, it would be extremely difficult to anticipate and identify all the rules and code them into the application.
The second problem is adaptability. When there are new data and situations, the old rules will not work. You will need to hand design new rules and/or modify the existing ones.
The third problem is that hand designed rule assume we have a complete understanding of all the situations, which we know is not always possible.
So this requires a different approach.
Isso significa que devemos usar o Machine Learning para todos os problemas? Na verdade, o aprendizado de máquina pode não ser a abordagem certa para tudo. Aqui estão algumas situações em que pensamos que o aprendizado de máquina deve ser considerado. A primeira situação é quando não pode criar e codificar as regras para tomar uma decisão. Por exemplo, se você quiser reconhecer imagem e fala, não há maneiras fáceis de codificar a lógica para conseguir isso. A segunda é quando você precisa de conhecimentos humanos para a tomada de decisões, mas o volume é muito grande para um ser humano fazê-lo de forma eficiente. No exemplo de detecção de spam, enquanto um ser humano pode fazê-lo, mas a quantidade de volume de dados torna impraticável para fazer isso manualmente rapidamente. A terceira situação é quando você precisa se adaptar e personalizar com base em dados individuais. Exemplos são recomendações de produtos individualizadas ou personalização de sites. A quarta situação é quando você não pode rastrear as informações rápido o suficiente para tomar uma decisão baseada em regras.
1 Dimensional -> 2D -> 3D +
Our mission is to take our rich experience and expertise with machine learning across Amazon and put it in the hands of all organizations--every developer, data scientist, reseacher.
Said another way, we want to simplify machine learning. We want to make it easy for all developers to easily build intelligent applications
We see the Machine Learning stack having three key layers.
In the bottom layer are the Frameworks and Infrastructure for expert practitioners,
In the middle layer are the Machine Learning Services that make it easy for machine learning developers and data scientists to build, train, and deploy machine learning models, in a single click with Amazon SageMaker.
And in the top layer are the AI Services that allow all developers to use pre-trained and auto-trained models to add intelligence to any application without machine learning expertise.
Go to Wisdom and download the EBC deck for more details.
We see the Machine Learning stack having three key layers.
In the bottom layer are the Frameworks and Infrastructure for expert practitioners,
In the middle layer are the Machine Learning Services that make it easy for machine learning developers and data scientists to build, train, and deploy machine learning models, in a single click with Amazon SageMaker.
And in the top layer are the AI Services that allow all developers to use pre-trained and auto-trained models to add intelligence to any application without machine learning expertise.
Go to Wisdom and download the EBC deck for more details.
You can build computer vision enabled applications quickly with Amazon Rekognition Image and Amazon Rekognition Video.
Amazon Rekognition image is an image recognition and analysis service powered by deep learning that allows search, verification and organization of millions of images.
Rekognition support wide range of compute vision capability
With Rekongition, you can detect thousands of objects and scenes such as bike and person
You can do facial analysis such as eye’s open, gender, age, and sentiment
You can recognize faces by comparing against a list of private face collection.
You can also filter impropriate content, detect celebrity and text in images
Best Practices
Max image size
Amazon S3 : 15 MB
API calls: 5 MB (base64 encoded)
Image format
PNG or JPEG
Image resolution
Min 80 px, 1024 (x or y) px recommended
Size of face should occupy ~5%+ of image for detection
Collections are for faces! (not cats, cartoons, …)
For AWS CLI, upload images to Amazon S3
AWS CLI cannot pass image bytes
Max number of faces in a single face collection is 1 million
Latency still under a second!
Max matching faces the search API returns = 4096
Use Delete* with caution
Use IAM to manage permissions
Use Amazon CloudWatch to observe/alert on Amazon Rekognition Metrics
Know the Amazon Rekognition API and save some $$$
RecognizeCelebrities returns face information from image (max 15), no need to call DetectFaces if you are just looking for presence of faces
Here is an example where you can use Rekognition video to identify guests at your front door in real time.
Another important domain in language is text analytics. It is estimated that 80%-90% of of all potential useable business information originates in unstructured text. So it is easy to understand the importance of having an automated text analytics capability to uncover insights in the text. However solving text analytics using machine learning is a hard problem as you need huge amounts of high quality data, smart machine learning algorithms, and you must iterate repeatedly in order to get a good working model at scale.
So we built Amazon Comprehend to help our customers unlock high value information from unstructured text at scale.
-----------------
Limits
The maximum document size is 5,000 bytes of UTF-8 characters per request.
Batch request – 25 documents per batch
Topic modelling – max number of topics is 100
Amazon Comprehend analyzes text and tells you what it finds. It can detect over 100 different kind of languages. It can find entities such as people, places, dates, products, and key phrases such as “beautiful views” in a hotel review, and sentiments, all from text in English and Spanish. Finally, Amazon comprehend can extract topics from a large set of documents.
Language detection, sentiment analysis, entity and key phrase extracts are designed for interactive use, with responses available in hundreds of milliseconds. Topic extraction works through a job-based model, with responses proportional to the size of the collection.
Comprehend is a continuously trained natural language processing service. It is trained using large sets of training data such as Amazon.com product description and reviews. Our engineers and data scientists continue to extend and refine the training data, with the goal of making the service increasingly accurate and more broadly applicable.
--------------------------------------
Let’s take a look at the key features of Amazon Comprehend.
Amazon Comprehend can extract positive, negative, neutral and mixed sentiment
It can extract entities like people, organizations, numbers, dates
You can extract key phrases that provide important meaning in the text like “beautiful views” in a hotel review
We support English and Spanish for Entities, Sentiment and Key phrases
We have language detection with capability to detect over 100 languages
The topic modeling API helps you detect topics in a corpus of text. This is an unsupervised algorithm and will work on text in any domain
And we use Deep Learning to power our APIs and this results in higher accuracy and continuous improvement over time with usage.
That's why we built Amazon Translate to help our customer with language translation needs for their businesses.
With Amazon Translate, you can automatically translate text from one language to another with a single API call
Amazon Translate is powered by deep learning technology that can provide real-time translation. It supports 12 language pairs and it can automatically detect the source language.
It uses a deep neural network architecture called encoder and decoder to train language pairs, once it is trained on the language pair, it can translate between the 2 languages. The encoder reads the source sentence one word at a time and construct a semantic representation of source text, the decoder uses the semantic representation to generate one word at a time in the target language.
You just call TranslateText API to translate your source text to target language.
-------------------------
Example applications of Shine: real-time translation of streaming text, on-demand translation of user-authorized text, document batch translation
Arabic (ar)
Chinese (Simplified) (zh)
French (fr)
German (de)
Portuguese (pt)
Spanish (es)