knitr::opts_chunk$set( collapse = TRUE, comment = "#>", dpi = 300, fig.path = "man/figures/README-", out.width = "100%", warning = FALSE, message = FALSE )
calibcurve
implements functions to compute true and predicted probabilities
and visualise a calibration curve, aka reliability diagram (Niculescu-Mizil &
Caruana, 2005).
calibcurve
is powered by the yardstick
's
infrastructure and its implementation of related curve metrics.
calibcurve
borrowed some ideas from sklearn's calibration module.
You can install the released version of calibcurve from CRAN with:
# install.packages("calibcurve") # Not yet!
And the development version from GitHub with:
# install.packages("devtools") devtools::install_github("chuvanan/calibcurve")
This is a basic example which shows you how to solve a common problem:
library(calibcurve) library(magrittr) library(ggplot2) data(two_class_example, package = "yardstick") head(two_class_example) two_class_example %>% calibration_curve(truth, Class1) two_class_example %>% calibration_curve(truth, Class1) %>% autoplot()
Please note that the calibcurve project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.