Skip to content
FRK Yazılım
AI

How Does Machine Learning Work? Explained With Examples

Instead of writing rules one by one, you show the computer examples and let it find the rule itself.

Machine learning is the foundation of most AI applications today. The name sounds complicated, but the idea is everyday: instead of describing an apple to a child, you show them many apples, and over time they learn to recognise one.

The core idea

Imagine you want to write a program that decides whether an email is spam. Writing the rules by hand is hard; spammers keep changing tactics. With machine learning, you instead give the program thousands of emails labelled “spam” and “not spam”. From these examples, the program learns which features point to spam. The result is called a model.

Types of learning

Supervised learning

The data comes with the correct answers, such as “this photo is a cat, this one is a dog”. Spam filters, house price prediction and image classification belong here.

Unsupervised learning

The data has no labels; the model groups similar examples on its own. A shop, for example, can use it to find customers with similar buying habits.

Reinforcement learning

The model learns by trial and error; good moves are rewarded and bad ones penalised. Game-playing AI and robot control often use this method.

How is a model tested?

Part of the data is used for training, and part is held back so the model can be tested on examples it has never seen. If a model does very well on training data but poorly on new data, it is overfitting: it has memorised the examples instead of learning the general rule.

Why data matters

A model is only as good as the data it learned from. A model trained on incomplete, wrong or one-sided data carries the same gaps into its results. That is why much of the time in machine learning projects goes into collecting and cleaning data.

Example: A vehicle recognition model trained only on daytime photos may struggle with photos taken at night.

Frequently asked questions

Does machine learning need huge amounts of data?

It depends on the task. Simple classification can work with a few thousand examples; large language models are trained on very large collections of text.

Once trained, is a model always right?

No. As the world changes, data changes too. Models need to be checked regularly against new data and retrained when necessary.

Related articles

AI

A Short History of AI: From Turing to Chat Assistants

AI from the 1950s to today: the Turing test, the first wave of excitement, the AI winters, the rise of machine learning and deep learning.

AI

Speech Recognition and Text-to-Speech: How Talking Technology Works

How speech recognition turns speech into text and text-to-speech turns text into voice, where they are used, and the risks.

AI

Asking AI Better Questions: The Basics of Writing Prompts

How to get better answers from chat assistants by giving context, defining a role, asking for a format and working step by step.