Learn / PyTorch
Advanced

Classification Metrics & Putting It Together

Accuracy, precision/recall, and reading model output correctly.

Accuracy alone can be misleading on imbalanced data (predicting "no" every time can still score 95% if positives are rare). Precision and recall tell a fuller story: precision asks "of what I flagged positive, how much was right?"; recall asks "of everything actually positive, how much did I catch?"

💡 Tip: Always call model.eval() (and wrap inference in torch.no_grad()) before evaluating, since layers like Dropout and BatchNorm behave differently in train vs. eval mode.

Now practice it

Exercises that use what this lesson just covered.

Loss Functions & Training LoopBack to overview →