Skip to content

Commit 813c9ef

Browse files
committed
postprocessing -> post-processing
1 parent ad599dd commit 813c9ef

19 files changed

+47
-47
lines changed

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Pre-1.0.0 numbering scheme: 0.x will indicate releases, while 0.0.x will indicat
6565
- training window step debugged
6666
- `min_train_window` argument removed from canned forecasters
6767
- add forecasters
68-
- implement postprocessing
68+
- implement post-processing
6969
- vignettes avaliable
7070
- arx_forecaster
7171
- pkgdown

R/epi_workflow.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#' Create an epi_workflow
22
#'
33
#' This is a container object that unifies preprocessing, fitting, prediction,
4-
#' and postprocessing for predictive modeling on epidemiological data. It extends
4+
#' and post-processing for predictive modeling on epidemiological data. It extends
55
#' the functionality of a [workflows::workflow()] to handle the typical panel
66
#' data structures found in this field. This extension is handled completely
77
#' internally, and should be invisible to the user. For all intents and purposes,

R/frosting.R

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -246,10 +246,10 @@ new_frosting <- function() {
246246
}
247247

248248

249-
#' Create frosting for postprocessing predictions
249+
#' Create frosting for post-processing predictions
250250
#'
251-
#' This generates a postprocessing container (much like `recipes::recipe()`)
252-
#' to hold steps for postprocessing predictions.
251+
#' This generates a post-processing container (much like `recipes::recipe()`)
252+
#' to hold steps for post-processing predictions.
253253
#'
254254
#' The arguments are currently placeholders and must be NULL
255255
#'
@@ -260,7 +260,7 @@ new_frosting <- function() {
260260
#' @export
261261
#'
262262
#' @examples
263-
#' # Toy example to show that frosting can be created and added for postprocessing
263+
#' # Toy example to show that frosting can be created and added for post-processing
264264
#' f <- frosting()
265265
#' wf <- epi_workflow() %>% add_frosting(f)
266266
#'
@@ -322,9 +322,9 @@ extract_frosting.epi_workflow <- function(x, ...) {
322322
}
323323
}
324324

325-
#' Apply postprocessing to a fitted workflow
325+
#' Apply post-processing to a fitted workflow
326326
#'
327-
#' This function is intended for internal use. It implements postprocessing
327+
#' This function is intended for internal use. It implements post-processing
328328
#' inside of the `predict()` method for a fitted workflow.
329329
#'
330330
#' @param workflow An object of class workflow
@@ -342,7 +342,7 @@ apply_frosting <- function(workflow, ...) {
342342
apply_frosting.default <- function(workflow, components, ...) {
343343
if (has_postprocessor(workflow)) {
344344
cli_abort(c(
345-
"Postprocessing is only available for epi_workflows currently.",
345+
"Post-processing is only available for epi_workflows currently.",
346346
i = "Can you use `epi_workflow()` instead of `workflow()`?"
347347
))
348348
}

R/layer_add_forecast_date.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#' Postprocessing step to add the forecast date
1+
#' Post-processing step to add the forecast date
22
#'
33
#' @param frosting a `frosting` postprocessor
44
#' @param forecast_date The forecast date to add as a column to the `epi_df`.
@@ -7,17 +7,17 @@
77
#' values. If there is a `step_adjust_latency` step present, it uses the
88
#' `forecast_date` as set in that function. Otherwise, it uses the maximum
99
#' `time_value` across the data used for pre-processing, fitting the model,
10-
#' and postprocessing.
10+
#' and post-processing.
1111
#' @param id a random id string
1212
#'
1313
#' @return an updated `frosting` postprocessor
1414
#'
1515
#' @details To use this function, either specify a forecast date or leave the
1616
#' forecast date unspecifed here. In the latter case, the forecast date will
1717
#' be set as the maximum time value from the data used in pre-processing,
18-
#' fitting the model, and postprocessing. In any case, when the forecast date is
18+
#' fitting the model, and post-processing. In any case, when the forecast date is
1919
#' less than the maximum `as_of` value (from the data used pre-processing,
20-
#' model fitting, and postprocessing), an appropriate warning will be thrown.
20+
#' model fitting, and post-processing), an appropriate warning will be thrown.
2121
#'
2222
#' @export
2323
#' @examples

R/layer_add_target_date.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
#' Postprocessing step to add the target date
1+
#' Post-processing step to add the target date
22
#'
33
#' @param frosting a `frosting` postprocessor
44
#' @param target_date The target date to add as a column to the `epi_df`. If
55
#' there's a forecast date specified upstream (either in a
66
#' `step_adjust_latency` or in a `layer_forecast_date`), then it is the
77
#' forecast date plus `ahead` (from `step_epi_ahead` in the `epi_recipe`).
88
#' Otherwise, it is the maximum `time_value` (from the data used in
9-
#' pre-processing, fitting the model, and postprocessing) plus `ahead`, where
9+
#' pre-processing, fitting the model, and post-processing) plus `ahead`, where
1010
#' `ahead` has been specified in preprocessing. The user may override these by
1111
#' specifying a target date of their own (of the form "yyyy-mm-dd").
1212
#' @param id a random id string

R/layer_point_from_distn.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#' Converts distributional forecasts to point forecasts
22
#'
3-
#' This function adds a postprocessing layer to extract a point forecast from
3+
#' This function adds a post-processing layer to extract a point forecast from
44
#' a distributional forecast. NOTE: With default arguments, this will remove
55
#' information, so one should usually call this AFTER `layer_quantile_distn()`
66
#' or set the `name` argument to something specific.

R/layer_predict.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
#' Prediction layer for postprocessing
1+
#' Prediction layer for post-processing
22
#'
33
#' Implements prediction on a fitted `epi_workflow`. One may want different
44
#' types of prediction, and to potentially apply this after some amount of
5-
#' postprocessing. This would typically be the first layer in a `frosting`
5+
#' post-processing. This would typically be the first layer in a `frosting`
66
#' postprocessor.
77
#'
88
#' @seealso `parsnip::predict.model_fit()`

R/layer_threshold_preds.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#' Lower and upper thresholds for predicted values
22
#'
3-
#' This postprocessing step is used to set prediction values that are
3+
#' This post-processing step is used to set prediction values that are
44
#' smaller than the lower threshold or higher than the upper threshold equal
55
#' to the threshold values.
66
#'

R/layers.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,11 @@ detect_layer.workflow <- function(x, name, ...) {
178178

179179
#' Spread a layer of frosting on a fitted workflow
180180
#'
181-
#' Slathering frosting means to implement a postprocessing layer. When
182-
#' creating a new postprocessing layer, you must implement an S3 method
181+
#' Slathering frosting means to implement a post-processing layer. When
182+
#' creating a new post-processing layer, you must implement an S3 method
183183
#' for this function
184184
#'
185-
#' @param object a workflow with `frosting` postprocessing steps
185+
#' @param object a workflow with `frosting` post-processing steps
186186
#' @param components a list of components containing model information. These
187187
#' will be updated and returned by the layer. These should be
188188
#' * `mold` - the output of calling `hardhat::mold()` on the workflow. This

man/apply_frosting.Rd

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

man/epi_workflow.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/frosting.Rd

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

man/layer_add_forecast_date.Rd

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

man/layer_add_target_date.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/layer_point_from_distn.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/layer_predict.Rd

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

man/layer_threshold.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/slather.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-population_scaling.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ test_that("Number of columns and column names returned correctly, Upper and lowe
8888
expect_equal(ncol(b), 5L)
8989
})
9090

91-
## Postprocessing
92-
test_that("Postprocessing workflow works and values correct", {
91+
## Post-processing
92+
test_that("Post-processing workflow works and values correct", {
9393
jhu <- epidatasets::cases_deaths_subset %>%
9494
dplyr::filter(time_value > "2021-11-01", geo_value %in% c("ca", "ny")) %>%
9595
dplyr::select(geo_value, time_value, cases)
@@ -149,7 +149,7 @@ test_that("Postprocessing workflow works and values correct", {
149149
expect_equal(p$.pred_scaled, p$.pred * c(2, 3))
150150
})
151151

152-
test_that("Postprocessing to get cases from case rate", {
152+
test_that("Post-processing to get cases from case rate", {
153153
jhu <- covid_case_death_rates %>%
154154
dplyr::filter(time_value > "2021-11-01", geo_value %in% c("ca", "ny")) %>%
155155
dplyr::select(geo_value, time_value, case_rate)

0 commit comments

Comments
 (0)