mlr-org / mlr3

mlr3: Machine Learning in R - next generation
https://mlr3.mlr-org.com
GNU Lesser General Public License v3.0
927 stars 86 forks source link

improve UX for as_task* (documentation and error handling) #933

Open mb706 opened 1 year ago

mb706 commented 1 year ago

When I have a dataset that I want to convert to a task, my first intuition would be to look up the help text of as_task. However, it does not tell me much about what it is doing, or where to go to convert some data that I have to a task.

Error handling for as_task_classif and related could also be improved:

as_task_classif(iris)
#> Error in .subset2(x, i, exact = exact) : 
#>   attempt to select less than one element in get1index