| invert.step_log | R Documentation |
Invert a log transformation
## S3 method for class 'step_log'
invert(object, predictions, ...)
object |
A recipe after fitting a model |
predictions |
A data frame with .pred |
... |
Other arguments |
A tibble with the log transformation inverted for .pred
data <- tibble::tibble(
y = rlnorm(n = 1000, meanlog = 0, sdlog = 1),
x = rnorm(n = 1000)
)
adj <- recipes::recipe(y ~ x, data = data) |>
recipes::step_log(recipes::all_outcomes()) |>
recipes::prep()
invert(
object = adj$steps[[1]],
predictions = tibble::tibble(.pred = adj[["template"]][["y"]])
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.