What is machine learning?
Machine learning is a branch of artificial intelligence in which software learns from data rather than following rules written by hand. It uses patterns in past examples to make predictions or classify new cases. Real-life examples of machine learning include spam filters for everyday email, forecasts of next month's business sales, and predictions of which customers might fail to pay.
Albert López·Founder of DelegIA·Updated
- Also called
- ML
- Type
- Technology
- Related to
- Generative AI, LLM, Human in the loop, AI agent
- Reading time
- 6 minutes
How does machine learning work?
For beginners, what distinguishes a machine learning model is that it learns patterns from examples. A conventional program follows rules someone writes: if an invoice exceeds a certain amount, it needs approval. Google describes machine learning models as software trained to make useful predictions or generate content from data.
The basics of machine learning involve three steps. First, you train the model on historical data with known outcomes. For a sales forecast, that could mean weekly sales from the past three years, along with the weather, holidays, and promotions. Then you test it on more recent weeks it hasn't seen and compare its estimates with actual sales. Once tested, the model uses new data to estimate how much you'll sell next week.
Machine learning dates back long before ChatGPT. IBM researcher Arthur Samuel used the term in a 1959 paper about a program that learned to play checkers. Since then, far more data and computing power have become available.
The three steps
- 1TrainWith historical data
- 2TestWith data it has not seen
- 3UseWith new data
Types of machine learning, with examples
Google groups machine learning systems into four categories based on how they learn to predict or generate content. A system can belong to more than one category. The first three are well established; the fourth is more recent.
Supervised learning
The model learns from examples with known correct answers, such as invoices labeled as paid or unpaid, and then predicts the answer for new cases. Examples of supervised machine learning include forecasting sales and estimating the risk that a customer will not pay.
Unsupervised learning
The model receives data without known answers and looks for groups and patterns. Grouping customers with similar buying habits and flagging transactions that fall outside the usual pattern are examples of unsupervised machine learning.
Reinforcement learning
The model tries actions and learns from the rewards or penalties it receives for the outcome. Uses include robotics, games, and tasks that involve repeated decisions.
The difference between AI, machine learning, and deep learning
In comparisons of AI vs machine learning vs deep learning, sales forecasting and spam filtering are examples of what artificial intelligence (AI) is used for. AI is the broader field, and machine learning is the most widely used way to build it today. The terms aren't interchangeable.
Examples such as image recognition, speech recognition, and text generation illustrate the difference between machine learning and deep learning, which uses neural networks with many layers. It requires much more data and computing power. Deep learning is a type of machine learning, though machine learning can also use other methods.
Generative AI tools such as ChatGPT, Claude, and Gemini also use deep learning. Their large language models are trained on vast amounts of text to create new content. The practical difference between generative AI and predictive AI is the output. Predictive AI produces a number or category, such as expected sales or whether a customer will pay. Generative AI writes, summarizes, or creates content.
Machine learning examples for businesses
Predictive AI is one example of what machine learning can be used for and has been part of banking, insurance, and business software for years. Practical, real-world applications of machine learning include these examples of business problems where the answer is a number or category:
| What it predicts | Data it uses | What it helps you do |
|---|---|---|
| How much you will sell | Past sales, seasonality, and promotions | Adjust purchasing and production to expected demand |
| Which customers might fail to pay | Each customer's payment history | Adjust payment terms or follow up on unpaid invoices sooner |
| Which machine might break down | Sensor readings and past breakdowns | Stop the machine before it fails |
| Which invoice or payment looks unusual | Invoices and payments from previous years | Review only the items that fall outside the usual pattern |
| Who should receive each email or support ticket | Emails the team has already classified | Route it to the right person |
To use these models, you need enough organized historical data about what you want to predict so the model has past examples to learn from. You also need someone to review predictions before acting on them, especially at first. This is known as human in the loop. The reviewer should compare the model's prediction errors with those of a simple baseline, such as sales from the same period last year.
Choose the model to fit the task. A chatbot can display a demand forecast from a connected predictive model, but it can't calculate one on its own. A predictive model, in turn, doesn't write customer replies. Many systems use both: one makes the prediction, and the other writes the response.
To explore what your business could predict with the data it already has, visit our AI solutions page. It explains how we build these systems and how to request a free initial call.
Sources

Albert López
Founder of DelegIA
Albert works with small and midsize businesses in Spain to decide where artificial intelligence makes sense. He implements the systems they agree on and supports the teams that use them. His glossary entries draw on what he learns at each company.
Last reviewed:
From the glossary
View the full glossary- Generative AIArtificial intelligence that creates new content, such as text, images, or audio, in response to a prompt.
- LLMThe language model inside ChatGPT, Claude, or Gemini: it reads what you write and drafts the response.
- Computer visionAI that lets a computer interpret images and video to identify what's there, where it is, and whether it meets expectations.
- Fine-tuningFurther training an existing model on your own examples to improve its performance on a specific task.
From the blog
View all articles
AI for small business: where to startHow to choose the first process to work on and decide whether the AI you already pay for can handle it.
AI for Excel: what it can do with your company's spreadsheetsWhat AI can do with your spreadsheets and how to use it in Excel, Google Sheets, and ChatGPT.
AI in marketing: what it can do for your business and how to get startedFive marketing tasks AI can already handle in a small business and when someone needs to review its work.