Machine learning
Evaluating models
模型评估
After training a model we need to know whether it works well on data it has never seen. So we test it on a separate test set and measure its performance with clear numbers.
The simplest measure is accuracy: the share of correct answers. But it can mislead: if 99% of emails are normal, a model that always says "normal" scores 99% without catching a single spam email.
That is why we use other measures: precision shows how many of the emails the model called spam really were spam, and recall shows how many of the real spam emails it managed to catch.
The most important measure depends on the task: in disease detection we want high recall so no patient is missed, and in email filtering we want high precision so no important email disappears.
One evaluation is not enough: the world changes and the data changes with it, so a model's performance drops over time. That is why models are monitored after launch and retrained when needed.
Ask the AI assistant
Ask anything about this lesson and get a simple answer with the terms in Chinese, Arabic and English.
The AI assistant runs on Google's Gemini model and can make mistakes. Do not write personal information. Available to signed-in learners, up to 30 requests a day.
The content is simplified and covers the basics only.