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.
Download Markdown (.md)Soroush’s Product Wiki · https://wiki.soroush.uk/topic/machine-learning/
01What 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.[1][2]
- 01Frame the taskPopulation, target, baseline, outcome, and risk
- 02Prepare dataRepresentative examples, labels, governance, and splits
- 03Train modelOptimize parameters against a stated objective
- 04EvaluateHeld-out, segmented, edge, and stress-test evidence
- 05Deploy inferenceIntegrate predictions or generation into workflow
- 06Monitor outcomesDrift, failures, user effects, cost, and feedback
Production evidence can trigger data, model, or product revision
Offline performance does not prove user benefit, causal impact, fairness, or stability after deployment; feedback data may itself be shaped by the model.
02Why 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.
03When 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.
04How it works
- Frame the prediction or generation task, target population, success measure, and baseline.
- Collect and govern representative data, then define labels or feedback where the learning method requires them.
- Split data appropriately and train a model by optimizing an objective on training examples.
- Evaluate on held-out and stress-test cases, including important segments and failure conditions.
- Integrate the model into a product decision or workflow with monitoring, feedback, and retraining or rollback criteria.
05A 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.
06Where 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.
07Sources
- What is Machine Learning?Google for Developers · Official educational documentationWhat is Machine Learning?
- Machine Learning GlossaryGoogle for Developers · Official technical glossaryMachine Learning Glossary