Open camroach87 opened 7 years ago
Use the indicies attribute of grouped tibble. Access with attr(*, "indices")
and attr(*, "labels")
. Make a grouped_validatr class. When fitting models, the models list element will be structured validatr$models$groups$folds
. Need to create separate folds for each group.
Tibble should be structured as follows:
Group1 | Group2 | Fold | Data | Train_Index | Validation_Index | Model | Predictions |
---|---|---|---|---|---|---|---|
Not sure if fold indices should be for entire original data frame or for data within groups
Does doing something like:
work? Does a separate validatr object get created for each group? Could this be added? Might allow for hierarchical reconciliation with a new function
reconcile
after the predictions. Just need to specify the hierarchical structure invalidatr
.