Skip to content

rename summarise functions; various options how #21

Description

@mt-digital

Rename depending on if they summarise observations of simulated dynamics (time series) or outcomes (success rate). Or, do something that looks like type-based metaprogramming to change how a single function, i.e., summarise, works depending on the input. Or maybe, even better:

# Run a trial and summarise observations and outcomes...
summaries <- run_trial(abm, stop = socmod::fixated)$summarise()
# ...returned as list; extract each from list output...
observations <- summaries$observations
outcomes <- summaries$outcomes
# ...or use default summary plotters; note get ggplot object returned;
# could have optional `save_name` named param, null by default, saves there
# if provided
p_obs <- trial$plot_series(summary = "observations", summary_f = socmod::summary_default_prevalence, ) + ggtitle("Prevalence plot")
p_obs <- trial$plot_series(summary = "observations", summary_f = socmod::summary_default_success) + ggtitle

First step should be to figure out the defaults. Not so relevant for immediate goals at the moment: problem set 2 that has the minority-majority work based on smexamples, and group-structure doesn't yet seem like it should be part of a set of simple, intuition-building defaults.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions