library("mlr3") library("mlr3oml") lgr::get_logger("mlr3")$set_threshold("warn") lgr::get_logger("mlr3oml")$set_threshold("warn") set.seed(1) options(datatable.print.class = FALSE, datatable.print.keys = FALSE, mlr3oml.verbose = FALSE)
Package website: release | dev
OpenML integration to the mlr3 ecosystem.
mlr3oml
?OpenML is an open-source platform that facilitates the sharing and dissemination of machine learning research data.
All entities on the platform have unique identifiers and standardized (meta)data that can be accessed via an open-access REST API or the web interface.
mlr3oml
allows to work with the REST API through R and integrates OpenML with the mlr3
ecosystem.
Note that some upload options are currently not supported, use the OpenML package package for this.
As a brief demo, we show how to access an OpenML task, convert it to an mlr3::Task
and associated mlr3::Resampling
, and conduct a simple resample experiment.
library(mlr3oml) library(mlr3) # Download and print the OpenML task with ID 145953 oml_task = otsk(145953) oml_task # Access the OpenML data object on which the task is built oml_task$data # Convert the OpenML task to an mlr3 task and resampling task = as_task(oml_task) resampling = as_resampling(oml_task) # Conduct a simple resample experiment rr = resample(task, lrn("classif.rpart"), resampling) rr$aggregate()
Besides working with objects with known IDs, data of interest can also be queried using listing functions. Below, we search for datasets with 10 - 20 features, 100 to 10000 observations and 2 classes.
odatasets = list_oml_data( number_features = c(10, 20), number_instances = c(100, 10000), number_classes = 2 ) head(odatasets[, c("data_id", "name")])
To retrieve individual datasets, you can use odt
and either manually construct a new Task
object using as_task()
or use it data.table
format.
odataset = odt(29) # Dataset as data.table str(odataset$data) # Creating a new task otask = as_task(odataset) otask
R6
classes.mlr3
counterpart.mlr3oml.cache
option.arff
and parquet
filetype for datasets are supported.mlr3
book.mlr3oml is a free and open source software project that encourages participation and feedback. If you have any issues, questions, suggestions or feedback, please do not hesitate to open an “issue” about it on the GitHub page!
In case of problems / bugs, it is often helpful if you provide a “minimum working example” that showcases the behaviour (but don’t worry about this if the bug is obvious).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.