# Machine Learning \(ML\)

Machine learning is an approach in which a model learns patterns from data to make predictions or generate outputs rather than following only hand-written rules.

- Type: term
- Domain: Engineering & architecture
- Level: Foundational
- Last reviewed: 2026-09-26
- Original: [Soroush’s Product Wiki](<https://wiki.soroush.uk/topic/machine-learning/>)

## What it means

Machine learning \(ML\) is a subset of artificial intelligence in which an algorithm fits a model from examples or feedback. The trained model maps new inputs to predictions, classifications, rankings, or generated outputs. Training learns model parameters; inference applies the resulting model. ML differs from conventional rules because behavior is substantially shaped by data and optimization rather than specified case by case.

## Why it matters

Many recommendations, forecasts, risk scores, search results, and generative features depend on ML. Product teams need to understand that quality is statistical and context-dependent, so requirements must cover data, evaluation, uncertainty, drift, monitoring, and correction—not only interface behavior.

## When to use it

Use ML when representative data exists, patterns matter more than perfectly explicit rules, and errors can be measured and managed. Avoid it when a simple rule solves the problem, training examples do not represent deployment, the target cannot be measured, or mistakes create unacceptable harm without reliable safeguards.

## How it works

1. Frame the prediction or generation task, target population, success measure, and baseline.
2. Collect and govern representative data, then define labels or feedback where the learning method requires them.
3. Split data appropriately and train a model by optimizing an objective on training examples.
4. Evaluate on held-out and stress-test cases, including important segments and failure conditions.
5. Integrate the model into a product decision or workflow with monitoring, feedback, and retraining or rollback criteria.

## A practical example

A marketplace trains a model to rank search results from past queries and purchases. It evaluates relevance and seller coverage offline, runs a controlled experiment against the existing ranking, and monitors new-category performance because historical behavior is sparse there.

## Where it breaks

Models inherit gaps and biases from data and objectives. High offline accuracy may not improve the user outcome, correlations may fail after conditions change, and feedback loops can reinforce past behavior. Training and serving also introduce operational, privacy, environmental, and maintenance costs.

## Common mistakes

- Choosing an algorithm before defining the product decision and measurable target.
- Allowing information from the test set or future events to leak into training.
- Reporting one aggregate metric while hiding performance differences across important cases.
- Assuming a deployed model will remain accurate without monitoring changes in data and outcomes.

## Visualization

[View the visualization on the website](<https://wiki.soroush.uk/topic/machine-learning/#visualization-machine-learning>)

## Sources

1. [What is Machine Learning?](<https://developers.google.com/machine-learning/intro-to-ml/what-is-ml>) — Google for Developers · Official educational documentation
2. [Machine Learning Glossary](<https://developers.google.com/machine-learning/glossary>) — Google for Developers · Official technical glossary

## Related topics

- [Artificial Intelligence \(AI\)](<https://wiki.soroush.uk/topic/artificial-intelligence/>)
- [Model Inference](<https://wiki.soroush.uk/topic/inference/>)
- [Model Evaluation](<https://wiki.soroush.uk/topic/model-evaluation/>)
