Matching Business Problems to Machine Learning Techniques and AWS Services
This lesson explains how to match a business problem to the right machine learning technique or AWS service, and when a traditional model or a foundation model is the better choice.
Learning outcomes
After completing this lesson, you will be able to:
- Distinguish regression, classification and clustering from the kind of answer each produces.
- Identify the AWS service most commonly associated with a machine learning task.
- Distinguish traditional machine learning models from foundation models.
Common techniques
Machine learning techniques are named after the kind of answer they produce. Regression predicts a continuous number, such as next month's sales or a delivery time. Classification predicts a category: binary, such as fraud or not fraud, multi-class, such as which product category, or multi-label, where several categories can apply at once. Clustering groups similar items without any labels, for example to segment customers.
Anomaly detection finds unusual data points, such as fraudulent transactions or a machine about to fail. Forecasting predicts future values of a time series, for demand planning. Recommendation suggests items a user is likely to want, as Amazon Personalize does. The following table summarises the techniques.
| Technique | Predicts or finds | Examples |
|---|---|---|
| Regression | A continuous number | Sales next month, house price, delivery time |
| Classification | A category: binary, multi-class or multi-label | Fraud or not, sentiment, churn, diagnosis |
| Clustering | Groups of similar items, without labels | Customer segmentation |
| Anomaly detection | Unusual data points | Fraudulent transactions, failing machines |
| Forecasting | Future values of a time series | Demand planning |
| Recommendation | Items a user may like | Amazon Personalize |
Which kind of prediction?
Matching tasks to AWS services
Many common machine learning tasks do not need a custom model, because AWS offers a managed service with a pre-trained model for the task. An application calls the service's API and receives the result, with no training or ML expertise required. Amazon Rekognition analyses images and video: it recognises objects, faces and text and detects unsafe content for moderation. Amazon Textract extracts printed and handwritten text, form fields and tables from scanned documents. Amazon Transcribe converts speech to text, and Amazon Translate translates text between languages. Amazon Comprehend understands text: it finds sentiment, key phrases, entities such as names and places, and personal data.
When a task is specific to the organisation, such as detecting fraud in its own transactions, forecasting its demand or predicting when its machines will fail, no pre-trained service fits, and a custom model is built and trained with Amazon SageMaker AI. The AWS Managed AI Services module covers these services in detail. The following table identifies the service most commonly associated with each task.
| Task | Service |
|---|---|
| Image recognition, content moderation | Amazon Rekognition |
| Document processing | Amazon Textract |
| Speech recognition | Amazon Transcribe |
| Translation | Amazon Translate |
| Language understanding | Amazon Comprehend |
| Custom fraud detection, demand forecasting, predictive maintenance | SageMaker AI |
Managed service or custom model?
Traditional ML or foundation models?
Traditional machine learning and foundation models suit different problems. Traditional ML models are trained for one narrow prediction, usually on structured data, such as predicting whether a customer will cancel. They are small, fast and cheap to run, and many of them can be explained, which matters for regulated decisions. Foundation models are large, general models that handle open-ended language and content tasks, such as writing, summarising, answering questions, holding a conversation and working with images as well as text, without being trained for each task. The following table summarises when to choose each.
| Choose | For |
|---|---|
| Traditional ML | Structured data, narrow predictions, strict explainability, low latency and cost |
| Foundation models | Open-ended language tasks, content generation, summarisation, conversation, multi-modal inputs |
Many solutions combine the two: an ML model scores fraud risk, and an LLM writes the explanation for an analyst.
Traditional ML or a foundation model?
Matching business questions to techniques
A bank's analytics team receives six requests. Translating each into the kind of output it needs identifies the technique, and in some cases a ready-made AWS service:
| Request | Output | Technique or service |
|---|---|---|
| "How much will this customer spend next year?" | A number | Regression |
| "Will this customer leave us?" | Yes or no | Binary classification |
| "Which customers behave alike?" | Groups | Clustering |
| "Flag card payments that look unusual" | Outliers | Anomaly detection |
| "Read the figures from scanned mortgage forms" | Extracted fields | Amazon Textract (no custom model needed) |
| "Calculate each customer's interest charge" | An exact amount | Not ML: a deterministic formula |
The last request is the trap. Interest must be calculated exactly and identically every time, so a formula is the right tool, and using ML would add cost and the risk of being wrong.
When is a traditional ML model a better choice than a foundation model?
Show answer
When the task is a well-defined prediction on structured data, such as forecasting demand or scoring fraud. A smaller trained model is usually cheaper, faster and easier to explain for such tasks.
Exam Tips
Remember for the exam
- Predicting a number is regression; predicting a category is classification.
- Grouping customers without labels is clustering.
- Finding unusual transactions is anomaly detection.
- Use a managed AI service when one matches the task; build a custom model in SageMaker AI when none does.
- Regulated decisions that need explanations often favour traditional, interpretable ML.
- Open-ended text generation or summarisation calls for foundation models.