calibration_plot: Draws a calibration plot

Description Usage Arguments Value

View source: R/calibration_plot.R

Description

Returns a ggplot2 object of calibration plot

Usage

1
2
3
calibration_plot(x, y, bins = 10, smooths = F, conf = T,
  abline = F, point_shape = 16, point_size = 3, span = 0.9,
  errorbar_width = 0.025, errorbar_size = 0.8)

Arguments

x

Vector of know labels on the test set

y

Vector of probability predictions on the test set

bins

If a single number this indicates the number of splits of the data are used to create the plot. By default, bins = 10. If a vector, these are actual cuts that will be used.

smooths

set this to TRUE if you want to draw a smoothing line using loess, or FALSE to draw a point graph. By default it is FALSE.

conf

whether to show 95% confidence bands, by default it is TRUE.

point_shape

the shape of point, see aes_linetype_size_shape, by default 16

point_size

the size of point, by default it is 3

span

the parameter which controls the degree of smoothing

errorbar_width

the width of the whiskers, by default 0.025

errorbar_size

the size of the whiskers, by default 0.8

aline

whether to connect these points when smooths = FALSE, by default this is TRUE

Value

ggplot2 object


liuhongwei2018/calibration documentation built on Dec. 8, 2019, 1:35 p.m.