Skip to contents

How much each feature changed over a history: the links of the chosen graphs it gained or lost, step by step (among the features that can vary on both sides of each step, as in vp_compare()). The features that change most are the hotspots of the history; a hotspot that many features require is a risky foundation.

Usage

vp_feature_churn(history, graphs = c("requires", "excludes", "atleastone"))

Arguments

history

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

graphs

The graphs whose links count.

Value

A tibble with feature, versions (in how many it can vary), steps_changed, gained, lost, churn (gained + lost) and required_by (in the last version where it can vary), the most changed first.

Examples

gens <- c("miband1", "miband2", "miband3", "miband4", "miband6")
history <- vp_history(
  vp_example(paste0(gens, "_realized.uvl")),
  versions = gens,
  or_graph = TRUE
)
vp_feature_churn(history)
#> # A tibble: 21 × 7
#>    feature         versions steps_changed gained  lost churn required_by
#>    <chr>              <int>         <int>  <int> <int> <int>       <int>
#>  1 BLEv42                 4             3     15     6    21           0
#>  2 Gyroscope              2             1     19     0    19           8
#>  3 ProximitySensor        2             1     19     0    19           8
#>  4 CapacityButton         4             3     12     6    18           4
#>  5 MovementFilter         4             3     16     2    18           0
#>  6 OLED                   4             3     12     6    18           4
#>  7 BLEv50                 2             1     13     4    17           8
#>  8 BLEv40                 4             3     13     2    15           1
#>  9 TouchScreen            3             2     11     4    15          11
#> 10 FullColor              2             1     13     2    15           8
#> # ℹ 11 more rows