Skip to content

The epi_df class is dropped when using training data in bake() #87

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

Closed
rachlobay opened this issue Jul 5, 2022 · 1 comment
Closed

Comments

@rachlobay
Copy link
Contributor

rachlobay commented Jul 5, 2022

As noted in the discussion for the step_training_window() pull request, when using training data in bake() (that is, bake(new_data = NULL) such as in the tests for this function in particular, we now lose the epi_df class of the resulting data frame. In that case, the baked data gets demoted to a plain old tibble.

I think the issue here is that when we put new_data = NULL in bake, bake.recipe sends us to juice() and since the composition is a tibble (by default), then new_data <- tibble::as_tibble(new_data) of juice() is causing the issue (see around line 845 here). This is why I think that all was well when bake(new_data = NULL) was used along with the as_tibble.epi_df function that is no longer in use. So, as Daniel noted, we may have to create our own bake.epi_recipe() and possibly juice.epi_recipe()methods if there is no easier way to solve this.

@rachlobay
Copy link
Contributor Author

Addressed by PR #53.

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