R/partition.R

Defines functions partition.TaskSurv

#' @export
partition.TaskSurv = function(task, ratio = 0.67, stratify = TRUE, ...) { # nolint
  if (stratify) {
    task = task$clone()
    task$set_col_roles(task$target_names[2L], add_to = "stratum")
  }

  NextMethod("partition")
}

Try the mlr3proba package in your browser

Any scripts or data that you put into this service are public.

mlr3proba documentation built on April 25, 2022, 5:07 p.m.