forked from mlr-org/mlr3oml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
64 lines (50 loc) · 1.82 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
output: github_document
---
```{r, include = FALSE}
library("mlr3")
library("mlr3oml")
lgr::get_logger("mlr3")$set_threshold("warn")
set.seed(1)
options(datatable.print.class = FALSE, datatable.print.keys = FALSE, mlr3oml.verbose = FALSE)
```
# mlr3oml
[](https://github.com/mlr-org/mlr3oml/actions?query=workflow%3Atic)
[](https://cran.r-project.org/package=mlr3oml)
[](https://stackoverflow.com/questions/tagged/mlr3)
**mlr3oml** allows to create [mlr3](https://mlr3.mlr-org.com/) tasks directly from [OpenML](https://openml.org) data sets.
Furthermore, you can also obtain the data and the resampling for a given OpenML task.
Caching can be enabled by setting the option `"mlr3oml.cache"`.
Uploading to OpenML is currently not supported, use the [OpenML package](https://cran.r-project.org/package=OpenML) package for this.
## Short Demo
```{r}
library("mlr3")
library("mlr3oml")
# be less verbose
lgr::get_logger("mlr3oml")$set_threshold("warn")
# retrieve data set as task from OML
tsk("oml", data_id = 31)
# retrieve a regular task from OML
tsk("oml", task_id = 59)
# retrieve resampling from OML
rsmp("oml", task_id = 59)
# R6 class for data sets
oml_data = OMLData$new(61)
oml_data$name
oml_data$nrow
oml_data$ncol
oml_data$data
# R6 class for tasks
oml_task = OMLTask$new(31)
oml_task$name
oml_task$nrow
oml_task$ncol
oml_task$task
oml_task$resampling
# list oml data sets with 5 features and 50 - 200 instances
tab = list_oml_data_sets(number_features = 5, number_instances = c(50, 200))
head(tab[, .(data_id, name)])
# list first 10 oml tasks
tab = list_oml_tasks(limit = 10)
tab[, .(task_id, data_id, name)]
```