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

Blocking does not work if blocking.cv = TRUE is not set in makeResampleDesc() #2787

Closed
pat-s opened this issue Sep 20, 2020 · 0 comments · Fixed by #2788
Closed

Blocking does not work if blocking.cv = TRUE is not set in makeResampleDesc() #2787

pat-s opened this issue Sep 20, 2020 · 0 comments · Fixed by #2788
Labels

Comments

@pat-s
Copy link
Member

pat-s commented Sep 20, 2020

library(mlr)
blocks = factor(sample(letters[1:4], nrow(iris), replace = TRUE))
task = makeClassifTask("iris", iris, target = "Species", blocking = blocks)
learner = makeLearner("classif.rpart")
rdesc = makeResampleDesc("Subsample", iters = 3)
# no blocking!
resample(learner, task, rdesc)

Even though this is documented in the articles, it can be easily forgotten by the user, leading to unnoticed undesired behavior.

A warning could be issued to notify users.

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