Your email inbox moves most spam out of sight before you see it. Your bank sometimes blocks a card payment that does not look like you. Your phone turns your voice into text. None of these systems was programmed with a complete list of rules. They learned from examples. That is machine learning.
This guide explains the idea in plain words: how learning from examples differs from classic software, the three main types, what deep learning and neural networks are, why the data matters so much, where small and medium-sized businesses already use it, and what it cannot do.
Machine learning in one sentence
Machine learning is a way of building software that learns patterns from examples, then uses those patterns to make predictions or decisions about new cases.
Google’s introductory course describes it as training a piece of software, called a model, to make useful predictions or generate content from data. IBM puts it the same way: the model finds regularities in example data and applies them to inputs it has never seen.
Rules versus examples
Classic software follows rules that a person writes. To sort email, a programmer might write: “if the subject contains ‘free money’, move it to spam”. This works until spammers change their wording, and then someone has to write a new rule.
Machine learning turns this around:
- Classic software: a person writes the rules, the computer applies them to data.
- Machine learning: a person supplies examples (thousands of emails marked “spam” or “not spam”), and the computer works out the rules itself.
The result is a model: a large set of numbers that captures what the examples have in common. When a new email arrives, the model gives its best guess, often with a level of confidence, such as “92% likely to be spam”.
Training and use
There are two phases:
- Training. The model is shown many examples and adjusts its internal settings until its answers match the examples as closely as possible. This can take minutes for a small model or months on thousands of computers for the largest ones.
- Use (sometimes called inference). The trained model is applied to new cases. This is the part you see in everyday tools.
A model does not keep learning on its own once it is in use, unless someone retrains it with new data.
The three main types of machine learning
Supervised learning: learning with the answers
The model learns from examples where the correct answer is known. Each email is marked “spam” or “not spam”; each past invoice is marked “paid on time” or “paid late”. The model learns to link the input to the answer.
Supervised learning is used for two kinds of task:
- Classification: putting things into categories (spam or not, fraud or not, invoice or delivery note).
- Regression: predicting a number (how many croissants will sell on Saturday, how long a repair will take).
Most machine learning in business today is supervised.
Unsupervised learning: finding structure without answers
Here the data has no labels. The model looks for patterns by itself, such as groups of similar items. A shop might use it to discover that its customers fall into a few natural groups by what they buy and when, without deciding those groups in advance. It is also used to spot unusual cases that do not fit any group, which is one way to flag possible errors or fraud.
Reinforcement learning: learning by trial and reward
The system acts, sees the result and receives a reward or a penalty. Over many attempts, it learns which actions lead to the best outcome. This is how programs learned to play Go and chess at a very high level, and how robots learn to walk. It is also used, together with human feedback, to make chatbots give more helpful and polite answers.
Reinforcement learning is rarely something an SME builds itself, but it shapes many of the tools you use.
Deep learning and neural networks
A neural network is a type of model loosely inspired by the brain. It is made of many simple units arranged in layers. Each unit takes in numbers, weights them and passes a result to the next layer. During training, those weights are adjusted millions or billions of times until the network gives good answers.
Deep learning simply means neural networks with many layers. More layers let the model pick up more complex patterns: the edges in an image, then shapes, then whole objects; or letters, then words, then meaning.
Deep learning is behind most of the progress of the last fifteen years: speech recognition, translation, image recognition, reading scanned documents and today’s chatbots. Its drawbacks are that it needs large amounts of data and computing power, and that its reasoning is hard to inspect. IBM notes that the largest models are much harder to interpret than simpler methods such as decision trees.
Why training data matters so much
A model learns only from what it is shown. That makes the data the most important ingredient, more than the algorithm.
Quality
Errors in the data become errors in the model. If half the “late payment” labels are wrong, the model learns the wrong lesson. If the sales history includes a month when the till system was broken, the forecast will be off. Cleaning and checking data usually takes more time than training the model.
Coverage
A model can only handle situations similar to those in its examples. A demand forecast trained on three normal years will not anticipate a pandemic. A document reader trained on German invoices may struggle with Italian ones.
Bias
If the examples reflect an unfair or unbalanced past, the model will repeat it. A model trained on past hiring decisions may learn to favour profiles that were favoured before, even if nobody intended it. The US standards body NIST points out that bias does not come only from the data: it also comes from how a system is designed, tested and used, and from the people involved. It recommends managing bias at every stage, from the first idea to everyday use.
For an SME, the practical lesson is simple: before trusting a model, ask what data it learned from, whether that data looks like your situation, and who checks the results.
Examples you already meet at work
Many of these run inside software you already use, so you may not think of them as AI:
- Spam and phishing filters. Trained on huge volumes of email to recognise unwanted or dangerous messages.
- Fraud detection. Card providers analyse patterns in transactions and block payments that look unusual. The Swiss data protection commissioner (FDPIC) cites this as a typical example of AI in everyday life.
- Demand forecasts. A bakery, a garden centre or a wholesaler can predict sales from past figures, the day of the week, holidays and the weather, and adjust orders and staffing.
- Document reading. Software reads scanned invoices, receipts or delivery notes and extracts the date, amount, VAT and supplier. This combines image recognition with language models.
- Speech-to-text. Dictating a site report or transcribing a meeting.
- Translation. Machine translation between French, German, Italian and English is deep learning.
- Recommendations. Online shops suggesting “customers also bought”.
- Predictive maintenance. Sensors on machines, combined with a model, warn that a part is likely to fail soon.
How machine learning relates to generative AI
The terms are nested, a bit like Russian dolls:
- Artificial intelligence is the broad field. The OECD, whose definition many laws follow, describes an AI system as one that infers from its inputs how to produce outputs such as predictions, content, recommendations or decisions.
- Machine learning is the main way of building AI today: learning from examples.
- Deep learning is machine learning with large neural networks.
- Generative AI is a use of deep learning that creates new content (text, images, sound, code) rather than only sorting or predicting.
- Large language models, such as those behind ChatGPT, Claude or Gemini, are generative models trained on very large amounts of text. Read more in our guides to generative AI and large language models.
The difference in practice: a classic machine learning model answers a narrow question (“is this spam?”, “how many units next week?”) and is often trained on your own data. A generative model is general-purpose, trained by a large provider on public data, and produces open-ended answers, which also makes it able to invent things that sound right but are wrong. Our guide to AI hallucinations explains why.
The limits of machine learning
- It finds correlations, not causes. A model may notice that ice-cream sales and sunburn rise together without knowing that the sun drives both.
- It struggles with the new. When conditions change (a new product, a new law, a crisis), past examples may no longer apply. Models need monitoring and retraining.
- It is never 100% right. Every model makes mistakes. The question is how often, which kind, and what they cost. A spam filter that lets one spam through is a nuisance; one that hides an important client email is worse.
- It can be hard to explain. Large models rarely give a reason a person can check. That matters when a decision affects someone.
- It depends on data you are allowed to use. Training or using a model on personal data falls under the Swiss Federal Act on Data Protection, as for any other processing. See our guide to Swiss AI law.
What this means for an SME
You do not need to build models to benefit from machine learning: most of it arrives inside tools you already pay for. When you consider a new AI feature, a few questions help:
- What exactly does it predict or decide?
- What data was it trained on, and does it resemble yours?
- How often is it wrong, and what happens when it is?
- Who checks the results before they affect a client, an employee or a payment?
- Where is your data processed?
If you want to go further, start with our plain-language guide to what AI is, then learn how to write a good prompt for the generative tools your team already uses.