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

Measure's check_prerequisites is ignored when calling $score() on a ResampleResult #1000

Open
sebffischer opened this issue Feb 1, 2024 · 0 comments

Comments

@sebffischer
Copy link
Sponsor Member

Maybe a misunderstanding from my side, but shouldn't I get a warning in the code below, as the regr.debug learner does not have the "selected_features" property?

library(mlr3)

rr = resample(tsk("mtcars"), lrn("regr.debug"), rsmp("holdout"), store_models = TRUE)
#> INFO  [17:13:24.525] [mlr3] Applying learner 'regr.debug' on task 'mtcars' (iter 1/1)
measure = msr("selected_features")
# is default anyway
measure$check_prerequisites = "warn"

rr$score(measure)
#>    task_id learner_id resampling_id iteration selected_features
#>     <char>     <char>        <char>     <int>             <num>
#> 1:  mtcars regr.debug       holdout         1                NA
#> Hidden columns: task, learner, resampling, prediction

Created on 2024-02-01 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