View source: R/dplot3_calibration.R
dplot3_calibration | R Documentation |
Draw calibration plot
dplot3_calibration(
true.labels,
est.prob,
n.bins = 10,
bin.method = c("equidistant", "quantile"),
pos.class.idi = 1,
xlab = "Mean estimated probability",
ylab = "Empirical risk",
mode = "markers+lines",
...
)
true.labels |
Factor or list of factors with true class labels |
est.prob |
Numeric vector or list of numeric vectors with predicted probabilities |
n.bins |
Integer: Number of windows to split the data into |
bin.method |
Character: "quantile" or "equidistant": Method to bin the estimated probabilities. |
pos.class.idi |
Integer: Index of the positive class |
xlab |
Character: x-axis label |
ylab |
Character: y-axis label |
mode |
Character: Plot mode |
... |
Additional arguments passed to dplot3_xy |
EDG
## Not run:
data(segment_logistic, package = "probably")
# Plot the calibration curve of the original predictions
dplot3_calibration(
true.labels = segment_logistic$Class,
est.prob = segment_logistic$.pred_poor,
n.bins = 10,
pos.class.idi = 2
)
# Plot the calibration curve of the calibrated predictions
dplot3_calibration(
true.labels = segment_logistic$Class,
est.prob = calibrate(
segment_logistic$Class,
segment_logistic$.pred_poor
)$fitted.values,
n.bins = 10,
pos.class.idi = 2
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.