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

Add autoplot() support for "groups" column role in rsmp("cv") #158

Merged
merged 1 commit into from
Sep 13, 2021

Conversation

pat-s
Copy link
Member

@pat-s pat-s commented Sep 12, 2021

fixes #157

library("mlr3verse")
#> Loading required package: mlr3
library("mlr3spatiotempcv")
library(data.table)
set.seed(42)

# create dataset with blocking from example dataset
task <- tsk("ecuador")
data_raw <- task$backend$data(1:task$nrow, task$feature_names)
group <- as.factor(sample(c("class1", "class2", "class3", "class4", "class5", "class6", "class7", "class8"),
  task$nrow,
  replace = TRUE
))
task$cbind(data.table("group" = group))
task$set_col_roles("group", roles = "group")

cv <- rsmp("cv", folds = 4)$instantiate(task)

# autoplot(cv, task)
autoplot(cv, task, fold_id = 1)

Created on 2021-09-12 by the reprex package (v2.0.1)

@codecov-commenter
Copy link

codecov-commenter commented Sep 12, 2021

Codecov Report

Merging #158 (fae5693) into main (133235c) will increase coverage by 0.06%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #158      +/-   ##
==========================================
+ Coverage   82.05%   82.11%   +0.06%     
==========================================
  Files          28       28              
  Lines        2312     2321       +9     
==========================================
+ Hits         1897     1906       +9     
  Misses        415      415              
Impacted Files Coverage Δ
R/autoplot.R 53.27% <100.00%> (+0.63%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 133235c...fae5693. Read the comment docs.

@pat-s pat-s merged commit 0f2e867 into main Sep 13, 2021
@pat-s pat-s deleted the autoplot-groups-support branch September 13, 2021 08:57
pat-s added a commit that referenced this pull request Jun 17, 2022
pat-s added a commit that referenced this pull request Jun 17, 2022
pat-s added a commit that referenced this pull request Jun 17, 2022
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

Successfully merging this pull request may close these issues.

autoplot(): Add support for grouped resamplings
2 participants