Slathering frosting means to implement a post-processing layer. It is the
post-processing equivalent of bake for a recipe. Given a layer, it applies
the actual transformation of that layer. When creating a new post-processing
layer, you must implement an S3 method for this function. Generally, you will
not need to call this function directly, as it will be used indirectly during
predict.
Arguments
- object
a workflow with
frostingpost-processing 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 callinghardhat::mold()on the workflow. This contains information about the preprocessing, including the recipe.forged- the output of callinghardhat::forge()on the workflow. This should have predictors and outcomes for thenew_data. It will have three componentspredictors,outcomes(if these were in thenew_data), andextras(usually has the rest of the data, includingkeys).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.