R/download_prediction.R

Defines functions download_prediction

download_prediction = function(run_id, server, desc = download_desc_run(run_id, server)) {
  is_prediction = which(grepl("prediction", desc$output_data$file$name))
  if (length(is_prediction) > 1L) {
    stopf("More than one prediction file on OpenML.")
  }

  url = desc$output_data$file$url[is_prediction]
  prediction = get_arff(url, server = server)
  return(prediction)
}

Try the mlr3oml package in your browser

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

mlr3oml documentation built on Aug. 26, 2025, 5:08 p.m.