Skip to content

Commit e81dffd

Browse files
committed
rename potato -> calibration (closes #48)
1 parent 3385fbc commit e81dffd

6 files changed

+16
-16
lines changed

R/adjust-numeric-calibration.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626
#'
2727
#' # create example data
2828
#' set.seed(1)
29-
#' d_potato <- tibble(y = rnorm(100), y_pred = y/2 + rnorm(100))
29+
#' d_calibration <- tibble(y = rnorm(100), y_pred = y/2 + rnorm(100))
3030
#' d_test <- tibble(y = rnorm(100), y_pred = y/2 + rnorm(100))
3131
#'
32-
#' d_potato
32+
#' d_calibration
3333
#'
3434
#' # specify calibration
3535
#' tlr <-
@@ -38,7 +38,7 @@
3838
#'
3939
#' # train tailor on a subset of data. situate in a modeling workflow with
4040
#' # `workflows::add_tailor()` to avoid having to specify column names manually
41-
#' tlr_fit <- fit(tlr, d_potato, outcome = y, estimate = y_pred)
41+
#' tlr_fit <- fit(tlr, d_calibration, outcome = y, estimate = y_pred)
4242
#'
4343
#' # apply to predictions on another subset of data
4444
#' d_test

R/adjust-probability-calibration.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
#' # split example data
2424
#' set.seed(1)
2525
#' in_rows <- sample(c(TRUE, FALSE), nrow(two_class_example), replace = TRUE)
26-
#' d_potato <- two_class_example[in_rows, ]
26+
#' d_calibration <- two_class_example[in_rows, ]
2727
#' d_test <- two_class_example[!in_rows, ]
2828
#'
29-
#' head(d_potato)
29+
#' head(d_calibration)
3030
#'
3131
#' # specify calibration
3232
#' tlr <-
@@ -37,7 +37,7 @@
3737
#' # `workflows::add_tailor()` to avoid having to specify column names manually
3838
#' tlr_fit <- fit(
3939
#' tlr,
40-
#' d_potato,
40+
#' d_calibration,
4141
#' outcome = c(truth),
4242
#' estimate = c(predicted),
4343
#' probabilities = c(Class1, Class2)

man/adjust_numeric_calibration.Rd

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/adjust_probability_calibration.Rd

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/test-adjust-numeric-calibration.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ test_that("basic adjust_numeric_calibration usage works", {
22
library(tibble)
33

44
set.seed(1)
5-
d_potato <- tibble(y = rnorm(100), y_pred = y/2 + rnorm(100))
5+
d_calibration <- tibble(y = rnorm(100), y_pred = y/2 + rnorm(100))
66
d_test <- tibble(y = rnorm(100), y_pred = y/2 + rnorm(100))
77

88
# fitting and predicting happens without raising conditions
@@ -13,7 +13,7 @@ test_that("basic adjust_numeric_calibration usage works", {
1313
)
1414

1515
expect_no_condition(
16-
tlr_fit <- fit(tlr, d_potato, outcome = y, estimate = y_pred)
16+
tlr_fit <- fit(tlr, d_calibration, outcome = y, estimate = y_pred)
1717
)
1818

1919
expect_no_condition(

tests/testthat/test-adjust-probability-calibration.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ test_that("basic adjust_probability_calibration() usage works", {
55
# split example data
66
set.seed(1)
77
in_rows <- sample(c(TRUE, FALSE), nrow(two_class_example), replace = TRUE)
8-
d_potato <- two_class_example[in_rows, ]
8+
d_calibration <- two_class_example[in_rows, ]
99
d_test <- two_class_example[!in_rows, ]
1010

1111
# fitting and predicting happens without raising conditions
@@ -20,7 +20,7 @@ test_that("basic adjust_probability_calibration() usage works", {
2020
expect_no_condition(
2121
tlr_fit <- fit(
2222
tlr,
23-
d_potato,
23+
d_calibration,
2424
outcome = c(truth),
2525
estimate = c(predicted),
2626
probabilities = c(Class1, Class2)

0 commit comments

Comments
 (0)