Skip to contents

Shuffle cross-validation mode for each learner type

Usage

assign_learner_cv(
  learner = c("lgb", "mlp", "elnet"),
  cv_mode = c("spatiotemporal", "spatial", "temporal"),
  cv_rep = 100L,
  num_device = ifelse(torch::cuda_device_count() > 1, 2, 1)
)

Arguments

learner

character(1). The base learner to be used. Default is "mlp". Available options are "mlp", "lgb", "elnet".

cv_mode

character(1). The cross-validation mode to be used. Default is "spatiotemporal". Available options are "spatiotemporal", "spatial", "temporal".

cv_rep

integer(1). The number of repetitions for each cv_mode.

num_device

integer(1). The number of CUDA devices to be used. Each device will be assigned to each eligible learner (i.e., lgb, mlp).

Value

A data frame with three columns: learner, cv_mode, and device.