Testing the as_task() converter across two structurally different OpenML tasks to ensure robust metadata mapping and feature type preservation.
library(mlr3)
library(mlr3oml)
# Fetching and converting tasks
task1 <- as_task(mlr3oml::otsk(3))
task2 <- as_task(mlr3oml::otsk(6))
print(task1)
print(task2)
The following logs confirm successful API communication and TaskClassif object creation.
── <TaskClassif> (3196x37) ───────────────── • Target: class • Target classes: won (positive class, 52%), nowin (48%) • Properties: twoclass • Features (36): • fct (36): bkblk, bknwy, bkon8, bkona, bkspr, bkxbq, ...
INFO [23:36:50.250] Retrieving JSON {url: `openml.org/api/v1/json/data/6`}
INFO [23:36:51.445] Retrieving ARFF {url: `openml.org/data/v1/download/6/letter.arff`}
── <TaskClassif> (20000x17) ────────────────
• Target: class
• Target classes: U (4%), D (4%), P (4%), T (4%), M (4%), ... + 16 more
• Properties: multiclass
• Features (16):
• int (16): high, onpix, width, x.bar, x.box, x.ege, ...
fct (factor) mapping for categorical datasets.