In traditional software, we tell the computer what to do step by step with rules. In machine learning, we give the computer many examples and let it work out the rules itself. Machine learning is the most widely used branch of artificial intelligence today.
A simple example: the spam filter
Writing every rule that decides whether an email is spam is practically impossible. Instead, the system is shown thousands of emails labelled "spam" or "normal". The model learns the patterns in these examples and becomes able to classify new emails it has never seen.
Three main types of learning
- Supervised learning: The model is trained on examples with known correct answers. Predicting house prices, recognising objects in images and detecting spam are examples.
- Unsupervised learning: The model discovers hidden groups and structures in unlabelled data, such as grouping customers by similar shopping behaviour.
- Reinforcement learning: The model learns the best strategy through trial and error, guided by rewards and penalties. Game-playing AIs and some robotics applications use this method.
Deep learning and neural networks
Deep learning is a machine learning approach inspired by how the brain works, using multi-layered "artificial neural networks". Thanks to big data and powerful processors, it has driven major advances in speech recognition, image processing, translation and text-generating chat assistants.
Everyday examples
- Recommendations on video and music platforms
- Face unlock on phones and automatic grouping in photo galleries
- Banks' detection of suspicious transactions
- Traffic predictions in map apps
- Automatic translation and voice assistants
Limits and risks
- Data quality: A model is only as good as the data it is trained on. Incomplete or wrong data leads to wrong results.
- Bias: Social biases in training data can be reflected in the model, which is why building fair, transparent systems is an important research area.
- Explainability: It can be hard to understand how some complex models reach a decision.
- Privacy: How personal data is used in training requires legal and ethical care.
How is a model trained and tested?
In machine learning projects, data is usually split into three parts. This split is the basic way of finding out whether a model has really learned:
- Training data: The main data set from which the model learns patterns; the largest share of the data goes here.
- Validation data: Used during training to choose the model's settings and to compare different attempts.
- Test data: Used once at the very end to measure how well the model performs on data it has never seen.
When data is limited, the “cross-validation” method splits the data into several parts and uses each part in turn for testing, so the result does not depend on a single lucky split.
Overfitting: the model that memorises
One of the most common problems in machine learning is “overfitting”. In this case, the model memorises not only the general rules in the training data but also its random details and noise. As a result, it looks almost perfect on the training data, but its performance drops markedly on new data. It is just like a student who memorises past years' questions without understanding the subject and then struggles with a new question. Collecting more and more varied data, not making the model more complex than necessary and stopping training when performance on the validation data starts to fall are common ways of reducing overfitting.
Frequently asked questions
Are AI and machine learning the same thing?
No. AI is a broad field covering systems that behave intelligently; machine learning is one of the most common methods within it.
What do I need to learn machine learning?
Basic statistics, linear algebra and a programming language (usually Python) are a good start. Many free online resources are available.
Sources and further reading
- Google – Machine Learning Crash Course (datasets and overfitting)
- Goodfellow, I., Bengio, Y. and Courville, A. (2016), Deep Learning, MIT Press
- scikit-learn documentation – Cross-validation: evaluating estimator performance
Leave a comment
Your email address will not be published. Required fields are marked *