AI · Term

Machine learning

Machine learning is a way of building software that learns patterns from examples instead of following rules a programmer wrote by hand, so it can make predictions or decisions about new data.

Traditional software follows instructions: if the order total is over a set amount, apply free shipping. Machine learning works the other way round. You show the system thousands of past examples with the right answers, and it works out the rules itself. It is the main method behind modern artificial intelligence.

Machine learning is good at problems where the rules are too many or too fuzzy to write down, like spotting spam or recognising a face. It is poor at problems with little data or where every case is genuinely new.

How it works

A model starts with random internal settings, called parameters. During training it makes a guess for each example, compares the guess with the correct answer and nudges its parameters to be less wrong next time. Repeated over millions of examples, the guesses become accurate.

There are three broad styles. Supervised learning uses labelled examples (this email is spam, this one is not). Unsupervised learning finds groups in unlabelled data. Reinforcement learning learns by trial and reward. Large language models combine several of these. You can check how a machine learning feature performs without knowing the maths. Ask what it is measured against, how often it is wrong and in which direction. A fraud filter that blocks a genuine customer has a different cost from one that lets a fraudster through, and the right balance depends on your business, not the vendor's. Good tools show you their errors, let you correct them and learn from the corrections.

The hard part is checking that a model has learned something general rather than memorised its examples. Builders hold back a portion of the data the model never sees in training, then test on it. A model that scores well on its training examples but poorly on the held-back set is said to overfit: it has learned the quirks of one dataset, not the pattern. Models also drift over time, because customer behaviour, prices and seasons change while the model stays fixed, so useful systems are retrained or at least re-tested regularly.

Example

An online shop feeds two years of order history into a model. The model learns which products tend to be bought together and starts suggesting a matching item at checkout. Nobody wrote a rule saying "garden gloves go with pruning shears"; the pattern came from what real customers did.

The owner can check whether the recommendations help by comparing two periods, or better, by showing the suggestion to half of visitors in an A/B test and measuring the average order value of each half. If the group seeing suggestions does not spend more, the model is decoration, however clever it sounds. The test also needs to run long enough to cover a normal sales cycle, or a single busy weekend can make the result look better than it is.

Why it matters for your business

Machine learning sits inside tools you already use: spam filters, ad bidding in Google Ads, fraud checks on card payments and product recommendations. Knowing that it learns from data explains its limits. If your data is small, messy or unusual, the predictions will be weak, and a simple rule may serve you better. If a vendor cannot tell you how its model's accuracy was measured, treat its claims with caution.

Common mistakes

  • Expecting a model to work well with only a few hundred examples of a complicated problem.
  • Training on past data that reflects old mistakes or biases and then trusting the predictions blindly.
  • Using machine learning where a clear, fixed rule would be cheaper, faster and easier to explain.

Questions people ask

Is machine learning the same as AI?

Machine learning is a subset of AI. AI is the overall aim of making computers handle tasks that need judgement, and machine learning is the most common technique for achieving it today. Some AI, such as hand-written expert systems, uses no machine learning at all.

How much data does machine learning need?

It depends on the problem. A simple prediction with a few clear inputs can work with thousands of rows, while recognising images or language needs millions of examples. Most small businesses use models that someone else has already trained on large datasets rather than training their own from scratch.

Can I use machine learning without a data scientist?

Yes, in most cases. Email filters, ad platforms, analytics tools and AI assistants all run machine learning behind the scenes. You need specialist help only if you want to train a custom model on your own data for a problem no existing tool solves.

Related terms

Have something worth building right?