Okay, we've established that machine learning systems learn from data, specifically from the features (inputs) and sometimes labels (outputs) within that data. But what exactly is the result of this learning process? That result is what we call a model.
Think of a machine learning model as a specific representation of the patterns discovered in your training data. It's the artifact created by running a machine learning algorithm on your dataset. The goal is for this model to capture the underlying relationships between the input features and, if applicable, the output labels, so it can make useful predictions or decisions on new, unseen data.
At its core, a model takes new input data (features) for which you don't know the outcome and produces an output, which is typically a prediction or a decision.
Consider a simple analogy: Imagine trying to figure out the relationship between the hours you study (x) and the score you get on a test (y). You collect data from several tests (your training data). The machine learning algorithm is the method you use to analyze this data (maybe plotting points and drawing a line). The model is the specific line you end up drawing, perhaps represented by an equation like y=5x+40. This equation (the model) captures the pattern you observed and can now be used to predict your score (y) for a new amount of study time (x).
The learning algorithm processes training data to produce the trained model. This model can then make predictions on new input data.
This is a fundamental difference from traditional programming highlighted in the previous chapter. Instead of writing explicit rules (if email contains 'free money' then mark as spam
), we provide data and let an algorithm learn the rules or patterns that constitute the model. The complexity of these patterns can range from a simple linear equation, as in our study example, to incredibly complex structures capable of recognizing images or translating languages.
It's helpful to distinguish between the algorithm and the model:
You use an algorithm on your data to train a model. This trained model is then saved and used for making future predictions. In the upcoming sections, we'll look closer at how models actually learn by adjusting their internal settings, known as parameters, and how we configure the learning process using hyperparameters.
© 2025 ApX Machine Learning