Helper to compute per-bin average confidence, accuracy, and counts.
- Parameters:
confidences (ndarray) – Array of confidence scores.
accuracies (ndarray) – Array of binary accuracies (0 or 1).
n_bins (int) – Number of bins.
- Returns:
Tuple of (bin_confidences, bin_accuracies, bin_weights).