random_search: Perform random search using a paramset.

Description Usage Arguments Details Value

View source: R/random_search.R

Description

Perform random search using a paramset.

Usage

1
2
random_search(resamples, recipe, param_set, n, scoring_func, ...,
  verbosity = TRUE)

Arguments

resamples

A data.frame with columns 'splits' and 'id', created using the 'rsample' package.

recipe

The recipe to use. See package 'recipes'.

param_set

Param set created by calling ParamHelpers::makeParamset.

n

Number of parameter combinations to generate.

scoring_func

Your custom train/predict/score function. Must take as parameters:

  • a training dataframe

  • the name of the target variable in the training dataframe

  • a list of parameters (these are the hyperparameters we are tuning)

  • an evaluation dataframe

  • dots. These are additional non-tunable parameters that could be passed to the function.

...

Optional params passed to train_predict_func.

Details

'scoring_func' can return a single score as a numeric vector, or multiple scores in a data.frame.

Value

A tidy data.frame, with one column per parameter, columns to identify the paramset and the fold, a column giving the row indices of the evaluation dataset, and columns for the performance scores (these are taken from the scoring function if it returned a data.frame, otherwise it will just be a _score_ column).


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