ITADN

Incorrect Equal Error Rate (EER) formula in doc

#3310Closedpeoxin 创建于 2025-12-08
documentation
P
peoxincommented
I believe there is an error in the formula of Equal Error Rate (EER) in the [documentation](https://lightning.ai/docs/torchmetrics/stable/classification/eer.html). The current formula: ``` EER = (FAR + (1 - FRR)) / 2, where min_t |FAR_t - FRR_t| ``` However, it should be: ``` EER = (FAR + FRR) / 2, where min_t |FAR_t - FRR_t| ``` The [implementation](https://github.com/Lightning-AI/torchmetrics/blob/88bca94f5d6a8b21d51047dc793e372aea75e0a5/src/torchmetrics/functional/classification/eer.py#L28) is correct: ``` def _binary_eer_compute(fpr: Tensor, tpr: Tensor) -> Tensor: """Compute Equal Error Rate (EER) for binary classification task.""" diff = fpr - (1 - tpr) idx = torch.argmin(torch.abs(diff)) return (fpr[idx] + (1 - tpr[idx])) / 2 ```
关闭于 2026-01-30 0 条评论