Home › Glossary › Fundamentals › Algorithm

Beginner · Fundamentals

Algorithm

Visual diagram · (in preparation) · Math · (in preparation) · Worked example · 3 difficulty levels.

TL;DR. A finite, well-defined sequence of steps used to learn from data or solve a computational problem.

Technical Definition

A finite, well-defined sequence of steps used to learn from data or solve a computational problem.

How it works

In ML, an algorithm specifies how a model is trained — for example, gradient descent updates parameters, k-means assigns clusters, decision trees split data by feature thresholds. The algorithm is the recipe; the model is the cake. Choosing the right algorithm depends on data type, scale, interpretability needs, and the structure of the problem (classification, regression, clustering, etc.).

Related Concepts

  • Gradient Descent — An optimization algorithm that iteratively adjusts model parameters by moving in the direction of steepest decrease of the loss function.
  • Model — A mathematical representation learned from data that maps inputs to outputs.
  • Training — The process of adjusting a model's parameters so it learns patterns from labeled or unlabeled data.