Skip to contents

Evaluate Learning Method

Evaluate Learning Method

Evaluate Learning Methods

Usage

evaluate(models, learner, evaluator, npoints, ...)

# S4 method for missing,Learner,Evaluator,missing
evaluate(
  learner,
  evaluator,
  x,
  y,
  weights,
  offset,
  resp.type,
  observations,
  logger,
  outdir,
  filename,
  rm.call = T,
  rm.fit = F,
  ...
)

# S4 method for TrainedList,Learner,Evaluator,missing
evaluate(
  models,
  learner,
  evaluator,
  x,
  y,
  weights,
  offset,
  resp.type,
  observations = NULL,
  logger,
  screened = NULL,
  config = character(),
  ...
)

# S4 method for TunedList,Learner,Evaluator,missing
evaluate(models, learner, evaluator, npoints, ...)

# S4 method for missing,ANY,Evaluator,numeric
evaluate(
  learner,
  evaluator,
  npoints = 3,
  ngrid,
  nmin = round(nrow(x)/2),
  x,
  looper = Looper(),
  logger,
  outdir = NULL,
  filename = "renoir",
  restore = T,
  rm.call = FALSE,
  rm.fit = FALSE,
  ...
)

# S4 method for missing,LearnerList,Evaluator,missing
evaluate(learner, evaluator, x, looper = Looper(), logger, ...)

# S4 method for TrainedList,missing,Evaluator,missing
evaluate(
  models,
  learner,
  evaluator,
  recorder,
  x,
  y,
  weights,
  offset,
  resp.type,
  samples = NULL,
  observations = NULL,
  logger,
  screened = NULL,
  config = character(),
  set = c("test", "train", "full"),
  min.obs = 0,
  auto.select = F,
  ...
)

Arguments

models

an object of class TrainedList

learner

an object of class Learner

evaluator

an object of class Evaluator

npoints

number of sample sizes to consider (i.e. number of training set sizes in the grid)

...

further arguments to learn function

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

(optional) vector of observation weights

offset

vector containing an offset, used for linear models. Default is NULL.

resp.type

the response type

observations

(optional) index of samples to use for training. If missing, observations will be sampled by using the Sampler in Evaluator. This is an helper argument, and shouldn't be used directly. Information of the sampling procedure in the output Evaluated object are still retrieved from Sampler in Evaluator even if observation is provided.

logger

an object of class Logger

outdir

path to the output directory

filename

(optional) name without extension for the output file

rm.call

logical, whether to remove the call from the models. Helpful if object size is expected to be big

rm.fit

logical, whether to remove the model fits used for tuning the hyperparameters . Helpful if object size is expected to be big object can be huge.

ngrid

(optional) grid of sample sizes to consider

nmin

minimum sample size (i.e. number of samples to use for training)

looper

a Looper to loop over the learning methods to evaluate