grid_predict: For a grid of params, return list of model predictions.

Description Usage Arguments Value

View source: R/grid_search.R

Description

This is a vectorized form of train_predict, vectorized over the param_grid.

Usage

1
2
grid_predict(split, recipe, param_grid, target_var, scoring_func,
  score_var = NULL, ..., verbosity, accept_func = NULL)

Arguments

split

A split A resampling split. See 'rsample' package.

recipe

Recipe. *Must have been prepped using 'retain = TRUE'. See 'recipe' package.

param_grid

List of list of parameters passed to the 'scoring_func' function.

target_var

Name of the target variable in the resample.

scoring_func

Your custom train/predict/score function.

score_var

Name of the score to use, in case 'scoring_func' returns a list of scores. If null (the default), will use the 1st score.

...

Optional params passed to scoring_func.

verbosity

If > 0, print paramset index.

Value

A list of data.frames with columns 'target' and 'predicted'.


artichaud1/tidytune documentation built on May 20, 2019, 9:13 p.m.