Lesson 3 of 4 AI and ML Fundamentals

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.

TechniquePredicts or findsExamples
RegressionA continuous numberSales next month, house price, delivery time
ClassificationA category: binary, multi-class or multi-labelFraud or not, sentiment, churn, diagnosis
ClusteringGroups of similar items, without labelsCustomer segmentation
Anomaly detectionUnusual data pointsFraudulent transactions, failing machines
ForecastingFuture values of a time seriesDemand planning
RecommendationItems a user may likeAmazon Personalize
Sort into groups

Which kind of prediction?

Exam skills 1.2.3

Decide which kind of output each question asks a model for.

Log in to try this activity Interactive activities are free with an account.

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.

TaskService
Image recognition, content moderationAmazon Rekognition
Document processingAmazon Textract
Speech recognitionAmazon Transcribe
TranslationAmazon Translate
Language understandingAmazon Comprehend
Custom fraud detection, demand forecasting, predictive maintenanceSageMaker AI
Scenario questions

Managed service or custom model?

Exam skills 1.2.5

Choose between a pre-trained AWS AI service and a custom model.

Log in to try this activity Interactive activities are free with an account.

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.

ChooseFor
Traditional MLStructured data, narrow predictions, strict explainability, low latency and cost
Foundation modelsOpen-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.

Sort into groups

Traditional ML or a foundation model?

Exam skills 1.2.6

Decide which kind of model suits each requirement.

Log in to try this activity Interactive activities are free with an account.
Worked example

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:

RequestOutputTechnique or service
"How much will this customer spend next year?"A numberRegression
"Will this customer leave us?"Yes or noBinary classification
"Which customers behave alike?"GroupsClustering
"Flag card payments that look unusual"OutliersAnomaly detection
"Read the figures from scanned mortgage forms"Extracted fieldsAmazon Textract (no custom model needed)
"Calculate each customer's interest charge"An exact amountNot 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.

Check yourself

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.