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

Train task is stored during simple $train() but not during resample() #947

Open
sebffischer opened this issue Jul 18, 2023 · 0 comments
Open

Comments

@sebffischer
Copy link
Sponsor Member

Is this intentional?

library(mlr3)

learner = lrn("regr.rpart")
task = tsk("mtcars")

learner$train(task)
learner$state$train_task
#> <TaskRegr:mtcars> (32 x 11): Motor Trends
#> * Target: mpg
#> * Properties: -
#> * Features (10):
#>   - dbl (10): am, carb, cyl, disp, drat, gear, hp, qsec, vs, wt

rr = resample(task, learner, rsmp("holdout"), store_models = TRUE)
#> INFO  [15:56:59.149] [mlr3] Applying learner 'regr.rpart' on task 'mtcars' (iter 1/1)
rr$learners[[1]]$state$train_task
#> NULL

Created on 2023-07-18 with reprex v2.0.2

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

1 participant