Framing ML Problems and Selecting Algorithms
This lesson explains how framing a business question as an ML problem type leads to a short list of suitable algorithms, most of which SageMaker AI offers as built-in options.
Learning outcomes
After completing this lesson, you will be able to:
- Frame a business question as a supervised, unsupervised or other problem type.
- Map problem types to algorithms.
- Use solution templates and pre-trained starting points.
Framing the problem
Supervised learning predicts a known label: binary or multiclass classification for categories (churn or not, ticket category) and regression for numbers (price, demand). Unsupervised learning finds structure without labels: clustering (customer segments), dimensionality reduction and anomaly detection. Other types include time-series forecasting, recommendation, ranking, NLP tasks (classification, entity extraction, translation), computer vision tasks (classification, object detection, segmentation) and generative tasks (text, images, code).
Frame the problem
Mapping problems to algorithms
For tabular classification and regression, gradient-boosted trees (XGBoost, LightGBM, CatBoost) are strong defaults; Linear Learner offers simple, interpretable models. K-Means clusters numeric data; PCA reduces dimensions; Random Cut Forest and IP Insights detect anomalies; DeepAR forecasts many related time series; Factorization Machines handle sparse user-item interactions; BlazingText classifies text and learns word vectors; the image classification, object detection and semantic segmentation algorithms cover vision. For generation, FMs are the default.
The following table maps typical business problems to problem types and algorithms.
| Business question | Problem type | Typical choice |
|---|---|---|
| Will this customer cancel? | Binary classification | XGBoost, Linear Learner |
| What will the house sell for? | Regression | XGBoost, Linear Learner |
| Which customers behave alike? | Clustering | K-Means |
| Is this transaction unusual? | Anomaly detection | Random Cut Forest |
| How many units next week per store? | Forecasting | DeepAR |
| Which products will this user like? | Recommendation | Factorization Machines, Amazon Personalize |
| What category is this text? | Text classification | BlazingText, fine-tuned transformer, Comprehend custom classifier |
| Where are the defects in this photo? | Object detection | Object detection algorithm, Rekognition Custom Labels |
| Summarize this report | Generation | FM on Amazon Bedrock |
The following diagram shows the three framings and the one chosen.

Problem to algorithm
Solution templates and starting points
Before building a model from scratch, existing starting points are worth checking. SageMaker JumpStart provides pre-trained models and example solutions for common use cases, such as demand forecasting, fraud detection and document understanding, which can be deployed directly or adapted with the organisation's own data.
For tabular data, SageMaker Canvas and SageMaker Autopilot run AutoML: they explore the data, try several algorithms and hyperparameter settings, and return a leaderboard of candidate models with their metrics. These give a strong baseline quickly and show whether a problem is worth further custom work.
Framing a vague request
A logistics manager asks for "AI to reduce late deliveries". Several framings are possible.
| Framing | Problem type | Data needed |
|---|---|---|
| Predict whether a shipment will be late | Binary classification | Past shipments labelled late or on time |
| Predict delivery time in hours | Regression | Past shipments with actual durations |
| Forecast daily volume per depot to plan staff | Forecasting | Daily volume history per depot |
Discussion shows that dispatchers can reroute shipments flagged as at risk, so binary classification with XGBoost on shipment features is the most actionable framing. The framing, not the algorithm, decided the solution.
What is a strong default algorithm family for tabular classification and regression?
Show answer
Gradient-boosted trees, such as XGBoost.
Exam Tips
Remember for the exam
- Frame the business question as a problem type first.
- Tabular classification and regression: gradient-boosted trees as a strong default.
- Anomalies: Random Cut Forest; forecasting: DeepAR; clustering: K-Means.
- Sparse user-item data: Factorization Machines or Amazon Personalize.
- AutoML on tabular data: SageMaker Canvas or Autopilot.