Before we get into measuring how well a machine learning model performs, let's clarify what we mean by a "model" in this context. You've already seen that evaluation is an essential step, but what exactly are we evaluating?
Think of a machine learning model as a specific type of computer program. Unlike traditional programs where developers write explicit, step-by-step instructions (if this, then do that), a machine learning model learns its own rules directly from data. It identifies patterns, trends, and relationships within the data it's trained on.
At its core, you can view a model as a mathematical function, let's call it f. This function takes some input data, often called features, and produces an output.
A simplified view of a machine learning model taking input features and producing an output prediction.
Let's revisit the types of problems mentioned earlier:
In a classification problem, the model learns to assign inputs to predefined categories or classes.
spam
or ham
.The model essentially learns a decision boundary to separate the different classes based on the input features.
In a regression problem, the model learns to predict a continuous numerical value.
$15,200
.So, when we talk about evaluating a model, we're assessing how accurately and reliably this learned function f produces the correct output (category or number) when it encounters new, previously unseen input data. The goal is to determine if the patterns the model learned from the training data generalize well to the real world.
© 2025 ApX Machine Learning