Visual overview
Training data often resides in S3; SageMaker AI supplies managed training and deployment capabilities for many model families.
Technical reference
These mechanics are durable conceptual anchors; exact implementation choices and hyperparameters depend on the algorithm and service.
Typical metrics include precision, recall, F1, ROC-AUC, or accuracy depending on class balance and error costs.
Common error measures include MAE, MSE, and RMSE; the business meaning of error should drive selection.
Iteratively assigns points to centroids and updates centroids; the requested number of clusters k is a key input.
Produces orthogonal principal components ordered by captured variance; often used for compression or visualization.
Learning uses reward signals from environment interaction and seeks strong cumulative rather than one-step reward.
Supervised learning: learn from input-output examples
Supervised learning trains on labeled examples: each training observation includes input features and a target value that represents the desired output. Classification predicts a discrete class or class probability, while regression predicts a continuous value. Algorithms compare predictions with known targets through a loss function and adjust model parameters to reduce error. The objective is generalization—performing well on new observations, not merely reproducing the training set.
Common model families include linear and logistic models, decision trees and boosted-tree ensembles such as XGBoost, and neural networks. Algorithm choice depends on data type, scale, nonlinear relationships, latency, interpretability, and business cost of different errors. For example, accuracy alone can be misleading for rare-event fraud detection; precision, recall, and the cost of false positives and false negatives may be more informative.
Unsupervised learning: find structure without target labels
Unsupervised learning receives observations without a target label and searches for useful structure. Clustering algorithms such as k-means partition observations according to similarity, while dimensionality-reduction methods such as principal component analysis (PCA) represent data with fewer derived dimensions. Other unsupervised tasks include anomaly detection and representation learning. The absence of labels means there is no single known answer against which every output can be scored.
That changes evaluation. A customer segmentation can have mathematically compact clusters yet still be useless to the business. An anomaly detector can surface unusual behavior that is not harmful. Evaluate unsupervised results with internal measures where appropriate, but also validate whether the discovered structure supports the intended decision. Data preprocessing and feature scale matter because many similarity-based algorithms are sensitive to how distance is represented.
Reinforcement learning: learn behavior from consequences
Reinforcement learning (RL) models a sequential interaction. An agent observes the state of an environment, chooses an action, receives a reward and a new state, and learns a policy intended to maximize cumulative reward. Unlike ordinary supervised learning, the training signal is not a correct label for every state. The agent must connect actions with later consequences and balance exploitation of known good behavior with exploration of alternatives.
The reward function effectively encodes the objective, so a poorly designed reward can teach undesirable shortcuts. RL is appropriate when decisions affect future states—robotics, control, game-like environments, or optimization problems are common examples. It is usually unnecessary when the task is a static labeled prediction. Simulated environments are valuable when exploration in the real world would be dangerous, slow, or expensive.
Key takeaways
- 01
Supervised learning uses labeled examples and commonly solves classification and regression problems.
- 02
Unsupervised learning discovers structure such as clusters, lower-dimensional representations, or anomalies without target labels.
- 03
Reinforcement learning learns a policy from states, actions, rewards, and subsequent states.
- 04
The evaluation metric must reflect the business cost of errors, not merely the algorithm's easiest numerical score.
- 05
Choose the paradigm from the feedback available in the problem, not from the popularity of an algorithm.
Official AWS sources
Use these primary AWS resources for the source material behind this article and for deeper reference.