How data helps shape a learned computer program, how training works, and where machine learning fits within artificial intelligence.
What is machine learning?
Machine learning is a way of making a computer program in which data helps determine the rules the program follows.
In traditional programming:
Human-written rules + data as inputs → answers
In machine learning:
Human-written learning process + training data → learned program (the model)
The model can then be used like this:
Model + new inputs → answers
This is the important shift. A programmer does not have to write every rule that produces the answer. The programmer writes a process that can learn, and the training data shapes what that process becomes.
Does data really write the program?
Not in the same way that a person writes source code.
During training, the learning process repeatedly compares the model's answers with examples or feedback. It then changes the model's internal numbers, called parameters, so that future answers are more likely to be useful or correct.
Those numbers may not look like ordinary instructions such as “if this happens, do that”. Yet together they control the model's behaviour. In that practical sense, the data helps write the learned part of the program.
A concise way to say it is:
Machine learning is software whose behaviour is programmed partly by people and partly by patterns learnt from data.
An ordinary example
Suppose we want a program to recognise whether a photograph contains a cat.
In traditional programming, we would try to write rules about ears, eyes, fur, legs and shapes. This becomes difficult because cats can appear in different positions, colours, lighting and surroundings.
With machine learning, we give a learning process many examples. Some photographs are labelled “cat” and others “not cat”. During training, the model adjusts itself until it becomes better at separating the two.
The finished model is a program for recognising cats, but no person wrote all of its recognition rules one by one. The examples helped form those rules inside the model.
What do people still decide?
Data does not create a machine-learning system by itself. People still make important choices:
- The goal: What should the model predict or produce?
- The structure: What kind of model and learning process should be used?
- The data: Which examples should be included, removed or labelled?
- The feedback: What counts as a good or bad answer?
- The test: How will we decide whether the model works safely and reliably?
So it would be misleading to say that data is the only programmer. The learned program comes from the interaction of human choices, the learning method and the data.
Is machine learning the same as artificial intelligence?
No. Artificial intelligence is the broader field, and machine learning is one way of building artificial intelligence.
AI is the attempt to make machines perform tasks that appear to require abilities such as reasoning, planning, perception, language or decision-making. Some AI systems use rules written directly by people. Machine-learning systems instead learn much of their behaviour from data.
The usual relationship is:
- Artificial intelligence is the broad field.
- Machine learning is a branch of artificial intelligence.
- Deep learning is a branch of machine learning that uses neural networks with many layers.
- Many present-day generative AI systems are built with deep learning.
This means AI is not broadly a child of machine learning. It is the other way around: machine learning is a child of AI. However, machine learning has become so important to modern AI that people often use the two terms as if they mean the same thing.
What does the model actually learn?
A model learns statistical patterns that help it make predictions or generate outputs. It may learn that certain shapes often occur in photographs of cats, or that certain words often follow other words.
This does not automatically mean that the model understands those things as a person does. It means the model has found useful patterns in its training experience.
The quality of that experience matters. Incomplete, incorrect or biased data can shape the model in the same direction. A learning process can compress patterns from its data, but it cannot guarantee that those patterns are true, fair or wise.
What follows from this idea?
A traditional program mainly contains instructions written explicitly by people. A machine-learning model also contains knowledge formed through training.
I find it useful to think of training as a new kind of programming. The source code defines how to learn. The data helps determine what is learnt. The trained model is the resulting program.
Data does not write the whole machine-learning system. But it does help write the part that makes the system behave intelligently.


