AI engineering glossary · Computer vision

What is top-k accuracy?

Top-k accuracy: A metric that counts a prediction as correct if the true class is among the model's k highest-scoring classes. Top-5 is common on datasets with many similar classes, where the exact label can be ambiguous.

Level: intermediateTopic: Computer vision

Top-k accuracy: an example

If the true label is 'Labrador' and the model ranks it second, top-1 counts it wrong while top-5 counts it correct.

Related terms

More Computer vision terms

Where you learn it

Top-k accuracy 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.