suppressPackageStartupMessages(library(dplyr))
suppressPackageStartupMessages(library(recipes))
data_tbl <- data.frame(
a = mtcars$mpg,
b = AirPassengers |> as.vector() |> head(32)
)
# Create a recipe object
rec_obj <- recipe(a ~ ., data = data_tbl) |>
step_hai_scale_zscore(b)
# View the recipe object
rec_obj
# Prepare the recipe object
prep(rec_obj)
# Bake the recipe object - Adds the Time Series Signature
bake(prep(rec_obj), data_tbl)
rec_obj |>
prep() |>
juice()
Run the code above in your browser using DataLab