openml / openml-r

R package to interface with OpenML
http://openml.github.io/openml-r/
Other
95 stars 37 forks source link

Why do we need an equivalent measure in mlr <-> OpenML to download tasks #448

Open pfistfl opened 4 years ago

pfistfl commented 4 years ago
convertOMLMeasuresToMlr = function(measures) {
  if (measures == "") return(NULL)
  lookup = lookupMeasures()
  assertSubset(measures, names(lookup))
  mlr.measures = lookup[measures]
  #mlr.measures = lapply(mlr.measures, mlr::setAggregation, aggr = mlr::test.join)
  return(mlr.measures)
}

The assert_subset is not required IMHO as we (at this point atleast) do not do anything with the measure. Instead if no equivalent is found, we could just map to a default, e.g. acc etc.