Skip to contents

An S4 class providing the methods to perform the tuning of hyperparameters and the training of the final model.

The object consists of 6 slots

Constructor for the S4 Tuner object.

Usage

Tuner(
  id = "grid.search",
  tuner,
  sampler = Sampler(method = "cv", k = 10L),
  looper = Looper(),
  screener = ScreenerList(Screener(id = "ebayes")),
  logger = Logger(),
  parameters
)

Arguments

id

object identifier, the name of the tuning method to use. If id is one of the supported by renoir, the constructor will automatically select a built-in tuner function.

tuner

(optional) function for tuning the hyperparameters of the model If tuning method is one of the supported by renoir, the constructor will automatically select a built-in tuner function. If tuner is provided it must conform to the renoir common interface, and must have the following formal arguments:

sampler

a Sampler object, the sampling procedure to use for tuning

looper

a Looper object

screener

a ScreenerList object, can contain just one Screener

trainer

a Trainer object

tester

a Tester object

selector

a Selector object

logger

a Logger object

hyperparameters

the input matrix, where rows are observations and columns are variables

x

the input matrix, where rows are observations and columns are variables

y

the response variable. Its number of rows must match the number of rows of x

weights

priors of the observations

offset

a priori known component to be included in the linear predictor during fitting

resp.type

the response type

...

additional arguments

It must return a Tuned or TunedList object

sampler

a Sampler object, the sampling procedure to use for tuning

looper

a Looper object

screener

a Screener object

logger

a Logger object

parameters

list containing the parameters to fix for the chosen tuning method. Please, note that the parameters shouldn't include the default renoir formals as they won't be considered. (It is helpful to change default settings)

Value

An object of class Tuner.

Slots

id

the name of the tuning method to use

tuner

function to use for tuning the hyperparameters of the model

parameters

list containing the parameters to fix for the chosen tuning method

logger

a Logger

sampler

a Sampler object, the sampling procedure to use for tuning

looper

a Looper object

screener

a ScreenerList object

Author

Alessandro Barberis