What is Machine Learning?
Posted on
Machine learning is a subfield of artificial intelligence (AI) concerned with building systems that improve their performance by learning from data. Rather than relying only on hand-written rules for every possible situation, machine learning methods use data to estimate patterns, relationships and decision rules. It is a deeply mathematical field, shaped by statistics, probability theory, optimisation and linear algebra, while also drawing on computer science and, historically, ideas from neuroscience.
There are many different approaches within machine learning, but most have a common structure: an algorithm uses data to train a mathematical model. Once trained, that model can be used to recognise patterns, make predictions, generate outputs or support decisions.
The terms “machine learning” and “AI” are often used interchangeably, but they are not identical. Machine learning underpins many recent advances in AI, but AI is the broader field. It includes the study of systems that can perform tasks traditionally associated with human intelligence, such as reasoning, planning, perception, language understanding, problem-solving and decision-making.
How does a machine learn?
There are different paradigms within machine learning, but many methods follow a broadly similar training process. This can be illustrated using a simple image classification example: deciding whether a picture contains a cat or a dog. This is a familiar example in machine learning because of the large number of easily available image-classification datasets, such as Kaggle’s Dogs vs. Cats dataset, which have been widely used to demonstrate and benchmark computer vision methods.

Representing the data: To enable a machine to learn from data, it must first be represented mathematically. Linear algebra provides the language that allows computers to process and manipulate large amounts of data. For example, each image in a cats and dogs dataset is converted into a grid of pixels which can be represented as numerical values (vectors, matrices or higher-dimensional tensors).
Making predictions: Once the data is represented mathematically, a machine learning model uses mathematical functions with adjustable parameters to identify patterns in the data. For example, the model analyses the pixel values and predicts whether the image contains a cat or a dog.
Measuring error: No machine learning model is 100% accurate but to determine how well it is performing, a loss function measures the difference between its predictions and the true values. This difference provides a numerical measure of error. Different tasks use different loss functions, depending on what the model is trying to predict. For example, if the image is actually a cat but the model predicts a dog, the loss function calculates how wrong the prediction was.
Improving the model: Optimisation algorithms, such as gradient descent, determine how the model's parameters should be adjusted to reduce error and improve performance. The aim is to find a set of parameters that minimise the loss. The ultimate goal is to generalise ¨C to make accurate predictions on previously unseen data. For example, the optimisation algorithm adjusts the model's parameters so that it is less likely that it will incorrectly identify a cat as a dog in the future even if it hasn’t seen that specific image of a cat before.
Quantifying uncertainty: Many machine learning models produce scores or probabilities alongside their predictions. For example, a model might classify an image as “cat” with 90% confidence. However, these scores should not be interpreted too naively: a model can be confidently wrong. More advanced probabilistic methods attempt to quantify uncertainty more carefully, helping users distinguish between predictions that are well supported by the data and those that are more tentative.

Different types of machine learning
Machine learning is often introduced through three major paradigms: supervised learning, unsupervised learning and reinforcement learning. This is a useful starting point, although it is not exhaustive. Modern machine learning also includes important approaches such as semi-supervised learning and self-supervised learning, which are especially relevant in contemporary AI systems.
Supervised learning uses training data in which each input is paired with a known output, often called a label. The model learns the relationship between inputs and outputs so that it can make predictions on new data. In the Dogs vs. Cats example above, the input is an image represented numerically as pixel values, and the output is the label “cat” or “dog”.
Supervised learning is commonly used for classification tasks, where the aim is to assign inputs to categories, such as detecting spam emails or identifying fraudulent transactions. It is also used for regression tasks, where the aim is to predict a continuous numerical value, such as estimating house prices from historical data.
Unsupervised learning uses unlabelled data. Instead of being given the correct answer for each example, the model tries to identify structure in the data, such as clusters, anomalies or lower-dimensional representations.
Unsupervised learning is useful when the goal is to discover patterns that are not already labelled. In cyber security, for example, it can help identify unusual network behaviour. In recommendation systems, clustering methods can group users with similar preferences, which can then support more relevant recommendations.
Reinforcement learning trains an agent to make decisions through interaction with an environment. The agent chooses actions, observes the consequences and receives rewards or penalties. Over time, it learns a strategy, or policy, that aims to maximise cumulative reward.

Reinforcement learning has been particularly successful in games, robotics and some autonomous systems. A famous example is DeepMind’s AlphaGo, which combined reinforcement learning with other AI techniques to master the board game Go. In 2016, AlphaGo defeated the South Korean Go grandmaster Lee Sedol in a landmark five-game match, demonstrating that AI systems could achieve superhuman performance in a game long regarded as extremely challenging for computers.
Neural networks and deep learning
Many modern machine learning systems are built using neural networks. Loosely inspired by the way biological neurons communicate, an artificial neural network consists of layers of interconnected computational units. These units transform input data through a sequence of mathematical operations, controlled by adjustable parameters known as weights and biases. During training, optimisation algorithms adjust these parameters to improve the model’s performance.
Deep learning is a subset of machine learning based on neural networks with many layers. These layers allow models to learn increasingly complex representations of data. For example, in an image-recognition system, early layers may detect simple features such as edges or textures, while later layers may detect more complex structures such as shapes, objects or faces. In language models, layers learn statistical and semantic relationships between words, phrases and longer passages of text.
Deep learning is behind many of the most visible recent advances in AI. Generative AI systems, including large language models such as ChatGPT and image generators such as Midjourney, are powered by deep learning. Deep learning is also used in facial recognition, speech recognition, machine translation, medical imaging, and voice assistants such as Siri and Alexa.

While deep learning has ushered in a new era of AI systems, these models do have some disadvantages. As with all machine learning models they only perform as well as the data on which they are trained ¨C if the data is biased then the model may make biased predictions. They can also be difficult to deploy reliably outside their training environments, particularly when encountering data that differs significantly from the training data.
Deep learning models require large datasets and high computational resources which come at a financial and environmental cost. They can have issues with overfitting, where the model learns the training data too closely and performs less well when presented with unseen data. Many deep learning models also lack interpretability, making it difficult to understand how they arrive at particular decisions or predictions.
Final thoughts
Machine learning has transformed AI and will continue to shape its future. Although the mathematics behind modern machine learning can be highly sophisticated, the central idea is relatively simple: use data to train models that can make better predictions, generate useful outputs or support more effective decisions.
Machine learning is the product of decades of mathematical, statistical and computational innovation. It is not the same as human intelligence, and it should not be treated as such. These systems do not understand the world in the way people do; they learn statistical structure from data and use that structure to produce outputs.
Understanding how machine learning models are trained, what they can do and where they can fail is essential if we are to use them responsibly. As machine learning becomes more embedded in science, business, public services and everyday life, clear public understanding of both its capabilities and its limitations will become increasingly important.
Related Blogs
Disclaimer
The opinions expressed by our bloggers and those providing comments are personal, and may not necessarily reflect the opinions of Lancaster University. Responsibility for the accuracy of any of the information contained within blog posts belongs to the blogger.
Back to blog listing