What is Machine Learning?
Machine Learning (ML) is a field of artificial intelligence in which an algorithm fits a model from data for a defined task and objective, then uses the learned relationship to predict, rank, describe structure, generate output, or choose actions on new inputs.
Quick Facts
| Created | 1959 by Arthur Samuel (coined the term) |
|---|---|
| Specification | Official Specification |
How It Works
Define the task before choosing a model
Start with the unit of prediction, the moment a prediction is made, the action it informs, and the cost of each error. Supervised learning estimates a target from labeled examples; unsupervised learning optimizes objectives without target labels; reinforcement learning optimizes sequential behavior from rewards. Self-supervised learning constructs supervision from the data itself. These are learning-signal choices, not guarantees of product value.
Separate fitting, model selection, and final evaluation
The training set fits parameters. A validation set supports choices such as features, hyperparameters, thresholds, and early stopping. A test set estimates final performance only after those choices are frozen. Random splitting is unsafe when users, devices, documents, or future observations can cross partitions; use group or time splits that reproduce the deployment boundary.
Measure generalization against a meaningful baseline
Training loss proves only that optimization fit the observed sample. Compare a candidate with a simple rule or existing system on task-relevant metrics, uncertainty, calibration, and failure slices. Accuracy can hide minority-class failures; offline relevance can miss delayed outcomes; a statistically better model may still be too slow, expensive, or unstable for the decision it supports.
Treat deployment as part of the learning system
Production behavior depends on feature freshness, preprocessing parity, serving thresholds, feedback loops, human overrides, and distribution change. Record data and model versions, monitor input and outcome drift, preserve rollback criteria, and distinguish retraining triggers from alert noise. Rules, retrieval, and human review often remain necessary around a learned component.
Key Characteristics
- Fits model parameters from data under an explicit objective or feedback signal
- Generalizes only to populations and conditions represented by a valid evaluation protocol
- Can use engineered features, learned representations, or both
- Requires separate data for fitting, model selection, and final assessment
- Must be compared with a relevant baseline and evaluated on failure slices
- Creates operational obligations for monitoring, drift, privacy, cost, and rollback
Common Use Cases
- Predicting risk or demand when the decision time and label window are explicit
- Ranking search or recommendation candidates under relevance and policy constraints
- Detecting anomalies with thresholds validated against investigation capacity
- Classifying language, speech, or visual inputs with subgroup error analysis
- Optimizing sequential decisions where actions change later observations
Example
Loading code...Frequently Asked Questions
How is machine learning different from traditional programming?
Traditional software usually encodes a decision procedure directly. Machine learning estimates part of that procedure from examples under a chosen objective. Real products often combine both: a model supplies a score or representation, while deterministic code enforces validation, permissions, thresholds, and fallbacks.
What are the main types of machine learning?
Supervised learning predicts labeled targets, unsupervised learning describes structure without target labels, and reinforcement learning optimizes sequential actions from rewards. Self-supervised and semi-supervised methods describe how supervision is obtained. A system can combine several types, so the task contract matters more than a rigid taxonomy.
Why does a machine-learning model need validation and test sets?
Training data fits parameters, while validation data influences model and threshold choices. Reusing either for the final score creates optimistic estimates. A held-out test set provides a cleaner final check, but only when its entities, time boundary, preprocessing, and label process represent deployment.
How much data does a machine-learning project need?
There is no universal record count. Requirements depend on signal strength, noise, model capacity, class rarity, target error, and the diversity of deployment conditions. Learning curves and slice-level confidence intervals are more useful than fixed thresholds; duplicated, biased, or leaked records can make a larger dataset worse.
When should a team avoid machine learning?
Prefer deterministic logic when the rule is stable, auditable, inexpensive, and covers the cases. Machine learning is a poor fit when labels cannot be defined, errors cannot be tolerated or recovered, the deployment distribution cannot be represented, or a simple baseline already meets the decision and operational requirements.