Exploring AI as a Web Developer

In an image classifier, the model returns a score for each class. The interface still has to decide what to show when even the highest score is low. A threshold gives the application a way to ask for another image.

What a threshold changes

Suppose an image gets a top score of 72%. With a threshold of 60%, the app displays the predicted class. Raise the threshold to 80%, and the same image now needs review. The model’s output stayed at 72%.

The examples below use fixed sample scores. Move the threshold to see where each decision changes. A passing score alone cannot establish whether a prediction is correct.

Score threshold

Move a decision threshold and see which sample scores pass it.

Sample A 46%
Review
Sample B 72%
Pass
Sample C 91%
Pass