invert.step_BoxCox: Invert a Box-Cox transformation

View source: R/invert.R

invert.step_BoxCoxR Documentation

Invert a Box-Cox transformation

Description

Invert a Box-Cox transformation

Usage

## S3 method for class 'step_BoxCox'
invert(object, predictions, ...)

Arguments

object

A recipe after fitting a model

predictions

A data frame with .pred

...

Other arguments

Value

A tibble with the Box-Cox transformation inverted for .pred

Examples


data <- tibble::tibble(
  y = rlnorm(n = 1000, meanlog = 0, sdlog = 1),
  x = rnorm(n = 1000)
)

adj <- recipes::recipe(y ~ x, data = data) |>
  recipes::step_BoxCox(recipes::all_outcomes()) |>
  recipes::prep()
  
invert(
  object = adj$steps[[1]], 
  predictions = tibble::tibble(.pred = adj[["template"]][["y"]])
)


tidysynthesis documentation built on March 17, 2026, 1:06 a.m.