Skip to contents

Slathering frosting means to implement a postprocessing layer. When creating a new postprocessing layer, you must implement an S3 method for this function

Usage

slather(object, components, workflow, new_data, ...)

Arguments

object

a workflow with frosting postprocessing steps

components

a list of components containing model information. These will be updated and returned by the layer. These should be

  • mold - the output of calling hardhat::mold() on the workflow. This contains information about the preprocessing, including the recipe.

  • forged - the output of calling hardhat::forge() on the workflow. This should have predictors and outcomes for the new_data. It will have three components predictors, outcomes (if these were in the new_data), and extras (usually has the rest of the data, including keys).

  • keys - we put the keys (time_value, geo_value, and any others) here for ease.

workflow

an object of class workflow

new_data

a data frame containing the new predictors to preprocess and predict on

...

additional arguments used by methods. Currently unused.

Value

The components list. In the same format after applying any updates.