Skip to content
← All articles

What is Machine Learning

The basic idea Most software works the way its programmer wrote it. Someone thinks through the logic, writes the rules, and the program follows them. A spam filter built this way would need a rule fo

Illustration generated for Neuricon.

Oct 13, 2026 · 5 min read

#fundamentals#basics

The basic idea

Most software works the way its programmer wrote it. Someone thinks through the logic, writes the rules, and the program follows them. A spam filter built this way would need a rule for every trick spammers use, and someone would have to update the rules every time the tricks changed.

Machine learning flips this around. Instead of writing the rules, you show the program examples and let it work out the rules itself. You feed it thousands of emails labeled spam or not spam, and it finds the patterns: certain phrases, odd sender addresses, suspicious links. The program that comes out the other end was not written line by line. It was shaped by the data.

The term itself dates to 1959, when IBM researcher Arthur Samuel used it to describe programs that improve at a task through experience rather than explicit instruction. His checkers program learned to play better the more games it saw, which was a strange idea at a time when every program did exactly what its author told it.

The three ingredients

Every machine learning setup has the same three parts, whatever the task.

Data comes first. This is the collection of examples the system learns from. For a spam filter, it is emails with labels. For a translation system, it is sentences paired with their translations. For a system that predicts house prices, it is records of past sales with their features: square footage, neighborhood, number of rooms. The data is the teacher. If it is thin, biased, or wrong, the learned behavior will be too, and no clever algorithm fixes that.

The model is the thing being shaped. Think of it as a flexible formula with knobs. Before training, the knobs are set randomly and the formula produces garbage. Training turns the knobs until the formula's outputs line up with the examples. In a neural network the knobs are called weights, and a large model can have billions of them. In simpler models there might be a handful.

The learning algorithm is the procedure that turns the knobs. It looks at how wrong the model currently is, figures out which direction to adjust each knob to be less wrong, and takes a step. Repeat millions of times and the model gradually fits the data. This loop, measuring error and adjusting, is the whole game. The details have names like gradient descent and backpropagation, and they each get their own article.

The main flavors

People usually divide machine learning into three kinds based on what the data looks like.

Supervised learning is the most common. Each training example comes with the right answer attached. The spam filter sees emails already marked spam or not. A system that tags photos sees images already labeled with what is in them. The model's job is to learn the mapping from input to label so it can label new inputs it has never seen. Most commercial machine learning, from credit scoring to speech recognition, is supervised learning.

Unsupervised learning gets data with no labels. The model has to find structure on its own: which customers cluster into similar groups, which transactions look unusual, which topics run through a pile of documents. It is useful when labeling data would be too expensive or when you do not know what you are looking for yet.

Reinforcement learning works differently again. There is no fixed dataset. An agent takes actions in an environment, a game or a simulation or sometimes the real world, and gets rewards or penalties. It learns a strategy that earns the most reward over time. This is how systems learned to play Go and how robots learn to walk in simulation. It needs far more trial and error than the other two, which is why it usually happens in simulated worlds where failure is cheap.

A concrete example

Here is supervised learning in about ten lines. The task is predicting a number from a feature, the simplest possible setup, using the scikit-learn library:

```python

from sklearn.linear_model import LinearRegression

# square footage -> sale price, from past sales

X = [[800], [1200], [1500], [2000], [2400]]

y = [180000, 250000, 310000, 400000, 470000]

model = LinearRegression()

model.fit(X, y) # the learning happens here

print(model.predict([[1700]])) # estimate for a new listing

```

Nothing in this code says how square footage relates to price. The fit call works that out from the five examples. With five examples the result is crude. With fifty thousand, plus more features, it starts to look like a real pricing tool. That scaling, more data plus a more flexible model, is the story of the entire field.

Where it shows up

Once you know the pattern, you see it everywhere. Recommendation feeds learn from what you clicked. Fraud detection learns from past fraudulent transactions. Voice assistants learn from recorded speech paired with transcripts. Medical imaging systems learn from scans labeled by radiologists. In each case the recipe is the same: examples in, adjustable model, learning algorithm turning the knobs.

What it does not do

Machine learning is pattern matching at scale, not understanding. A model trained to spot tumors in scans does not know what a tumor is. It knows which pixel patterns correlated with the label "tumor" in its training data. This matters because the model will happily apply the pattern where it does not belong. Change the camera, the hospital, or the patient population, and performance can drop without warning. The model has no sense of when it is out of its depth.

It also inherits whatever the data contains. Train a hiring tool on a company's past hiring decisions and it will learn the company's past biases along with everything else. The model does not know the difference between a useful pattern and an unfair one. Deciding which patterns are acceptable to use is a human job, and it stays one.

Data quantity sets a hard floor. A model cannot learn a pattern it has never seen enough examples of. Rare events, new situations, and tasks where every case is unique are all places where machine learning struggles, because there is nothing to generalize from.

Comments

Loading comments…

Leave a comment

Posting as (guest — sign in for a profile)