Supervised learning uses training examples that pair inputs with known outputs. Inputs are represented as features, such as transaction amount, account age, or words in a support ticket. The known output is called a label or target. During training, an algorithm adjusts a model to reduce a loss function that measures disagreement between its predictions and the supplied targets. The goal is to generalize to new examples, not simply memorize the training data.
The two main task types are classification and regression. Classification predicts membership in discrete categories, such as fraudulent versus legitimate transactions or billing versus technical support tickets. A classifier may produce scores or probabilities that are converted into decisions using a threshold. Regression predicts a numeric quantity, such as a house price, delivery duration, or energy consumption. A numeric label does not automatically imply regression: customer categories encoded as 0, 1, and 2 still describe a classification problem.
Choose supervised learning when representative examples with reliable target values are available. Predicting customer churn from historical customer records and known cancellation outcomes is classification. Estimating repair costs from completed maintenance jobs is regression. Grouping customers by similarity without predefined segment labels is clustering, an unsupervised technique. Reinforcement learning differs because an agent learns a decision policy through interactions and rewards rather than directly learning from example input-output pairs.
In a cloud workflow, engineers typically store historical data in object storage, prepare features, create training and evaluation datasets, and run training on managed compute. They then deploy the trained model for real-time inference or run batch predictions over accumulated records. Labels are needed for supervised training and evaluation, but they are not required for each new input at prediction time. Actual outcomes collected later can support performance monitoring and retraining.
Evaluation must reflect the intended production environment. Use training data to fit the model, validation data to select settings, and a separate test set for final assessment. For time-dependent problems, train on earlier observations and evaluate on later ones. Prevent target leakage by excluding information unavailable when the prediction would be made; for example, a cancellation confirmation date must not be used to predict whether a customer will cancel.
Metric selection depends on the business cost of errors. Fraud classification often requires precision and recall because high accuracy can hide failure to detect a rare positive class. Regression commonly uses mean absolute error or root mean squared error. Decision thresholds should account for false positives and false negatives rather than relying automatically on a default cutoff.
Practical trade-offs include labeling effort, noisy or biased historical outcomes, compute costs, inference latency, and model interpretability. More complex models are not automatically better, and more data does not compensate for incorrect labels or leakage. Production performance can decline when input distributions or relationships change, so monitor data quality and evaluate predictions against actual outcomes when those outcomes become available. Supervised learning identifies predictive patterns; it does not, by itself, establish causation.