Skip to content

Commit 69a3026

Browse files
committed
rename potato to calibration (closes #944)
1 parent 5737af7 commit 69a3026

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

R/grid_code_paths.R

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -392,9 +392,9 @@ tune_grid_loop_iter <- function(split,
392392
# on `analysis(inner_split(split))`, the inner analysis set (just
393393
# referred to as analysis)
394394
# * that model generates predictions on `assessment(inner_split(split))`,
395-
# the potato set
395+
# the calibration set
396396
# * the post-processor is trained on the predictions generated from the
397-
# potato set
397+
# calibration set
398398
# * the model (including the post-processor) generates predictions on the
399399
# assessment set and those predictions are assessed with performance metrics
400400
# todo: check if workflow's `method` is incompatible with `class(split)`?
@@ -406,13 +406,13 @@ tune_grid_loop_iter <- function(split,
406406
analysis <- rsample::analysis(split)
407407

408408
# inline rsample::assessment so that we can pass indices to `predict_model()`
409-
potato_rows <- as.integer(split, data = "assessment")
410-
potato <- vctrs::vec_slice(split$data, potato_rows)
409+
calibration_rows <- as.integer(split, data = "assessment")
410+
calibration <- vctrs::vec_slice(split$data, calibration_rows)
411411
} else {
412412
analysis <- rsample::analysis(split)
413413

414-
potato_rows <- NULL
415-
potato <- NULL
414+
calibration_rows <- NULL
415+
calibration <- NULL
416416
}
417417

418418
rm(split)
@@ -520,7 +520,7 @@ tune_grid_loop_iter <- function(split,
520520
iter_msg_predictions <- paste(iter_msg_model, "(predictions)")
521521

522522
iter_predictions <- .catch_and_log(
523-
predict_model(potato %||% assessment, potato_rows %||% assessment_rows,
523+
predict_model(calibration %||% assessment, calibration_rows %||% assessment_rows,
524524
workflow, iter_grid, metrics, iter_submodels,
525525
metrics_info = metrics_info, eval_time = eval_time),
526526
control,
@@ -537,17 +537,17 @@ tune_grid_loop_iter <- function(split,
537537

538538
if (has_postprocessor(workflow)) {
539539
# note that, since we're training a postprocessor, `iter_predictions`
540-
# are the predictions from the potato set rather than the
540+
# are the predictions from the calibration set rather than the
541541
# assessment set
542542

543543
# train the post-processor on the predictions generated from the model
544-
# on the potato set
544+
# on the calibration set
545545
# todo: needs a `.catch_and_log`
546546
#
547-
# if the postprocessor does not require training, then `potato` will
547+
# if the postprocessor does not require training, then `calibration` will
548548
# be NULL and nothing other than the column names is learned from
549549
# `assessment`.
550-
workflow_with_post <- .fit_post(workflow, potato %||% assessment)
550+
workflow_with_post <- .fit_post(workflow, calibration %||% assessment)
551551

552552
workflow_with_post <- .fit_finalize(workflow_with_post)
553553

0 commit comments

Comments
 (0)