regression.check_recipe_func: Check 'regression.recipe_func'

View source: R/approach_regression_separate.R

regression.check_recipe_funcR Documentation

Check regression.recipe_func

Description

Check that regression.recipe_func is a function that returns the RHS of the formula for arbitrary feature name inputs.

Usage

regression.check_recipe_func(regression.recipe_func, x_explain)

Arguments

regression.recipe_func

Either NULL (default) or a function that that takes in a recipes::recipe() object and returns a modified recipes::recipe() with potentially additional recipe steps. See the regression vignette for several examples. Note, to make it easier to call explain() from Python, the regression.recipe_func can also be a string containing an R function. For example, "function(recipe) return(recipes::step_ns(recipe, recipes::all_numeric_predictors(), deg_free = 2))" is also a valid input. It is essential to include the package prefix if the package is not loaded.

x_explain

A matrix or data.frame/data.table. Contains the the features, whose predictions ought to be explained.

Author(s)

Lars Henry Berge Olsen


NorskRegnesentral/shapr documentation built on April 19, 2024, 1:19 p.m.