Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use two or more tasks in AutoML #32

Open
MislavSag opened this issue Sep 16, 2021 · 2 comments
Open

Use two or more tasks in AutoML #32

MislavSag opened this issue Sep 16, 2021 · 2 comments

Comments

@MislavSag
Copy link

It seems to me it is not possible to use two or more tasks in AutoML?

If that's true, I would like to make feature request.

This is ussually possible in using mlr3 benchmark. It is possible to degine multiple tasks, learners etc.

If I use two tasks in AutoML:


library(mlr3automl)
library(mlr3verse)

task_1 <- tsk("iris")
task_2 <- tsk("iris")
bmr_results = AutoML(list(task_1, task_2))
bmr_results = AutoML(c(task_1, task_2))

it returns an error:

Error in if (task$task_type == "classif") { : argument is of length zero

BTW, is there any way I can contribute tu this package and help in developing? Maybe adding new learners, there are many of them in mlr3extensions?

@a-hanf
Copy link
Owner

a-hanf commented Sep 17, 2021

mlr3automl adapts to the provided task (the pipeline that is created may be different for different tasks). Also, optimal hyperparameters will depend on the data. I'm not sure I understand your use case, can you elaborate a little bit more on what you want to happen when there are multiple tasks?

I would be happy to have more contributors :) You can create a pull request into the development branch with any new features / bugfixes / etc.

@MislavSag
Copy link
Author

It s possible to use more than one task in mlr3 benchmark, for example:

design = benchmark_grid(
  tasks = tsks(c("spam", "german_credit", "sonar")),
  learners = lrns(c("classif.ranger", "classif.rpart", "classif.featureless"),
    predict_type = "prob", predict_sets = c("train", "test")),
  resamplings = rsmps("cv", folds = 3)
)

but this is not possible in AutoML function. I thought it would be very convenient to allow for more than onw task in AutoML. All tasks should be of the same type ofc (for example all should be binary classification).

It seems to me you found workaround to use number of features in mlr3 trafo. It seems there is an simple solution here mlr-org/mlr3tuning#309.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants