exploring the business use cases for amazon machine learning - june 2017 aws online tech talks
TRANSCRIPT
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Kumar Venkateswar, Product Manager, Amazon AI
6/12/2017
Amazon Machine Learning
Agenda
Smart applications by example
Developing with Amazon ML
Demo
How Amazon ML fits into other AWS AI services
Q&A
Machine learning and smart applications
Machine learning is the technology that
automatically finds patterns in your data and
uses them to make predictions for new data
points as they become available
Your data + machine learning = smart applications
Challenge: Insurance companies spend billions of
dollars on roof losses annually
Solution: BuildFax provides roof age and condition
estimates with the help of Amazon ML.
BuildFax
Amazon Machine Learning democratizes the process of building predictive models. It's easy and fast to
use, and has machine-learning best practices encapsulated in the product, which lets us deliver results
significantly faster than in the past.
Joe Emison
Founder & Chief Technology Officer
Challenge: Restaurant owners want to use data to
better serve their customers
Solution: Upserve provides predictions on the
number of customers and items ordered with the
help of Amazon ML.
Upserve
Using Amazon Machine Learning, we can predict the total number of customers who will walk through a
restaurant’s doors in a night. As a result, restaurateurs can better prep and plan their staffing for that night.
Bright Fulton
Director of Infrastructure Engineering
And a few more examples…
Fraud detection
(binary)
Detecting fraudulent transactions, filtering spam emails,
flagging suspicious reviews, …
Personalization
(categorical)
Recommending content, predictive content loading,
improving user experience, …
Targeted marketing
(binary/categorical)
Matching customers and offers, choosing marketing
campaigns, cross-selling and up-selling, …
Content classification
(categorical)
Categorizing documents, matching hiring managers and
resumes, …
Churn prediction
(binary)
Finding customers who are likely to stop using the
service, free-tier upgrade targeting, …
Customer support
(categorical)
Predictive routing of customer emails, social media
listening, …
But why not use business rules instead?
Smart applications by counter-example
SELECT c.ID
FROM customers c
LEFT JOIN orders o
ON c.ID = o.customer
LEFT JOIN products p
ON p.ID = o.product
GROUP BY c.ID
HAVING o.category = ‘toys’
AND ((p.description LIKE ‘%copter%’
AND o.date > GETDATE() - )
OR (COUNT(*) > 2
AND SUM(o.price) > 150
AND o.date > GETDATE() – 40)
)
Use machine learning
technology to learn
your business rules
from data, instead of
endlessly iterating
business rules
Trainmodel
Evaluate andoptimize
Retrieve predictions
1 2 3
Building smart applications with Amazon ML
Trainmodel
Evaluate andoptimize
Retrieve predictions
1 2 3
Building smart applications with Amazon ML
- Create a Datasource object pointing to your data
- Explore and understand your data
- Transform data and train your model
Create a Datasource object
>>> import boto3
>>> ml = boto3.client('machinelearning')
>>> ds = ml.create_data_source_from_s3(
DataSourceId = 'my_datasource',
DataSpec= {
'DataLocationS3':'s3://bucket/input/',
'DataSchemaLocationS3':'s3://bucket/input/.schema'},
ComputeStatistics = False)
Explore and understand your data
Train your model
>>> import boto3
>>> ml = boto3.client('machinelearning')
>>> model = ml.create_ml_model(
MLModelId=’my_model',
MLModelType='REGRESSION',
TrainingDataSourceId='my_datasource')
Trainmodel
Evaluate andoptimize
Retrieve predictions
1 2 3
Building smart applications with Amazon ML
- Understand model quality
- Adjust model interpretation
Explore model quality
Fine-tune model interpretation
Fine-tune model interpretation
Trainmodel
Evaluate andoptimize
Retrieve predictions
1 2 3
Building smart applications with Amazon ML
- Batch predictions
- Real-time predictions
Batch predictions
Asynchronous, large-volume prediction generation
Request through service console or API
Best for applications that deal with batches of data records
>>> import boto3
>>> ml = boto3.client('machinelearning')
>>> model = ml.create_batch_prediction(
BatchPredictionId = 'my_batch_prediction’
BatchPredictionDataSourceId = ’my_datasource’
MLModelId = ’my_model',
OutputUri = 's3://examplebucket/output/’)
Real-time predictions
Synchronous, low-latency, high-throughput prediction generation
Request through service API or server or mobile SDKs
Best for interaction applications that deal with individual data
records
>>> import boto3
>>> ml = boto3.client('machinelearning')
>>> ml.predict(
MLModelId=’my_model',
PredictEndpoint=’example_endpoint’,
Record={’key1':’value1’, ’key2':’value2’})
{
'Prediction': {
'predictedValue': 13.284348,
'details': {
'Algorithm': 'SGD',
'PredictiveModelType': 'REGRESSION’
}
}
}
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Demo
We are here to make machine learning widespread…
by sharing what we use ourselves!
Developer APIs: Rekognition, Polly, Lex, Amazon Kinesis Analytics
Developer platform components: Amazon Machine Learning
Data Scientist platform components: Apache Spark MLlib,
Apache MXNet, Deep Learning AMI
Lower level platform components: Elastic MapReduce, EC2
(CPU, GPU, and FPGA instances)
More to come, of course!
Amazon Confidential
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Q&A
Amazon Confidential
What else can we do?