Skip to content

Future redesign of epi_slide and epix_slide #458

@dshemetov

Description

@dshemetov

Related issue: #234

Logan and I did some brainstorming about what use cases epi_slide is trying to cover. We found that it doesn't behave gracefully when the slide computation function f returns data.frame/tibble outputs (which is something may occur if you're trying to, say, make a forecast per ref_time_value). This led us to thinking that perhaps we shouldn't even recommend using epi_slide for forecasting use cases, perhaps epix_slide should be the goto function for that (where an epi_df can be quickly converted to a fake archive with version = time_value). This in turn even led us to suspect that maybe epi_slide computation functions f should be limited to functions that return atomic vectors, like those covered by epi_slide_opt.

TODO

  • examine the use cases of epi_slide in our vignettes and catalogue them; we need to make sure that we have an alternative/workaround for its more exotic use cases
  • consider more specialized functions epi_slide_reframe or epi_slide_mutate, to imply and constrain the outputs of f to the user

Side-note: formats for epix_slide to use when the slide function f returns data.frame/tibble outputs

Three possible output formats

# Deep
geo | time | slide_value (list)
----------------------------
a        1        list(m = , w = , p = )
a        2        list(m = , w = , p = )
a        3        list(m = , w = , p = )

# Wide
geo | time | metadata (list) | workflow (list) | preds (list)
-------------------------------------------------------
a        1        ...
a        2        ...
a        3        ...

# Long
geo | time | name              |  value (list)
-------------------------------------------------------
a        1        "metadata"        < >
a        2        "workflow"
a        3        "preds"

The deep format is simple from the epi_slide writer's POV, but maybe difficult for the user to index into. The wide format will have issues with name collisions (e.g. if the output has geo_value and time_value as well).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions