Skip to contents

This function takes whatever grid functions that are available in {dials}, converts it to a sklearn suitable format by renaming the hyper parameters as well as adding fixed parameters to overwrite the default values in sklearn if provided and perform some cleaning such as converting R mtry counts to Python col_by_sample proportion.

Usage

rpwf_grid_gen_(
  model,
  preproc,
  rename_fun,
  grid_fun = NULL,
  update_params = NULL,
  ...
)

Arguments

model

a model spec object defined by {parsnip}.

preproc

a recipe object defined by {recipes}.

rename_fun

a function to rename the grid, generated by rpwf_grid_rename_()

grid_fun

a dials::grid_<functions>, e.g., dials::grid_random(), dials::grid_latin_hypercube(). Default NULL assumes that no grid search is performed and sklearn defaults are used.

...

additional arguments for the grid_fun functions.

Value

a rpwf_grid object, which is just a modified {dials} grid but made suitable for sklearn.