Skip to contents

Bins predicted probabilities and computes observed frequencies within each bin. Useful for calibration plots of binary classifiers.

Usage

calibration_df(truth, prob, n_bins = 10L)

Arguments

truth

numeric vector (0/1 or TRUE/FALSE).

prob

numeric vector of predicted probabilities.

n_bins

integer, number of bins (default 10).

Value

A data.frame with columns bin_mid, obs_freq, mean_pred, n.