Skip to contents

One row per feature and version, with measures taken in that version (the predictors) and what happened to the feature afterwards (the outcomes): the table that a prediction model learns from.

Usage

vp_prediction_table(history, horizon = 3)

Arguments

history

A history: the versions of a model, from vp_read_history() or vp_history(), oldest first.

horizon

How many versions ahead gone_later looks.

Value

A tibble with version, feature, age (versions since it could first vary), the measures required_by, requires, excludes, level, direct_dependants, betweenness, and the outcomes gone_next (absent in the next version), gone_later (absent horizon versions later; NA near the end) and new_dependants (new features that require it directly in the next version).

Examples

gens <- c("miband1", "miband2", "miband3", "miband4", "miband6")
history <- vp_history(
  vp_example(paste0(gens, "_realized.uvl")),
  versions = gens,
  or_graph = TRUE
)
vp_prediction_table(history, horizon = 2)
#> # A tibble: 36 × 12
#>    version feature     age required_by requires excludes level direct_dependants
#>    <fct>   <chr>     <dbl>       <int>    <int>    <int> <int>             <int>
#>  1 miband2 Screen        0           2        2        0     0                 0
#>  2 miband2 OLED          0           2        2        0     0                 0
#>  3 miband2 Capacity…     0           2        2        0     0                 0
#>  4 miband2 Movement…     0           0        0        0     0                 0
#>  5 miband2 HeartRat…     0           0        0        0     0                 0
#>  6 miband2 BLEv40        0           0        0        2     0                 0
#>  7 miband2 BLEv42        0           0        0        2     0                 0
#>  8 miband2 BT40          0           0        0        2     0                 0
#>  9 miband3 Screen        1           6        2        1     0                 3
#> 10 miband3 TouchScr…     0           0        3        1     1                 0
#> # ℹ 26 more rows
#> # ℹ 4 more variables: betweenness <dbl>, gone_next <lgl>, gone_later <lgl>,
#> #   new_dependants <int>