AI engineering glossary · Evaluation metrics

What is weighted averaging?

Weighted averaging (also called weighted-average, weighted F1): A way to combine per-class metrics by averaging them with weights proportional to how many true examples each class has. It reflects the class distribution, so a weak rare class has little effect on the final number, unlike macro averaging.

Level: intermediateTopic: Evaluation metrics

Weighted averaging: an example

Class A (900 samples) has F1 0.95 and class B (100 samples) has F1 0.50; the weighted F1 is 0.9 * 0.95 + 0.1 * 0.50 = 0.905.

Related terms

More Evaluation metrics terms

Where you learn it

Weighted averaging is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.