knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(dplyr) library(tidy.outliers) library(recipes)
One of neat applications of tidy.outliers is that you may want to model just use the outlier score outside of an workflow, this can be easily done as show.
Prep your recipe.
example_recipe <- recipe(. ~ .,data = mtcars) |> step_outliers_maha(all_numeric())
Bake it with null.
example_recipe |> prep() |> bake(new_data = NULL)
You can even give it a new name!
example_feature <- recipe(. ~ .,data = mtcars) |> step_outliers_maha(all_numeric(),name_mutate = 'maha') |> prep() |> bake(new_data = NULL) example_feature |> select(maha,everything())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.