Skip to contents

Features that change together: pairs of features whose links change in the same steps, as version histories of code reveal files that are always edited together. Two features that change together without a link between them may be tied by something the graphs do not hold (a rule over three features, shared code, the same developer).

Usage

vp_co_change(
  history,
  graphs = c("requires", "excludes", "atleastone"),
  min_together = 2
)

Arguments

history

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

graphs

Which graphs: any of "requires", "excludes" and "atleastone".

min_together

Keep the pairs that changed together in at least this many steps.

Value

A tibble with feature_1, feature_2, together (steps in which both changed), steps_1, steps_2, jaccard (together over the steps in which either changed), through_their_link (steps in which a link between the two themselves changed) and linked (a link joins them in the last version that has both; NA if none has).

Examples

gens <- c("miband1", "miband2", "miband3", "miband4", "miband6")
history <- vp_history(
  vp_example(paste0(gens, "_realized.uvl")),
  versions = gens,
  or_graph = TRUE
)
vp_co_change(history, min_together = 1)
#> # A tibble: 136 × 8
#>    feature_1 feature_2       together steps_1 steps_2 jaccard through_their_link
#>    <chr>     <chr>              <int>   <int>   <int>   <dbl>              <int>
#>  1 BLEv40    BLEv42                 3       3       3       1                  0
#>  2 BLEv40    BT40                   3       3       3       1                  0
#>  3 BLEv40    CapacityButton         3       3       3       1                  3
#>  4 BLEv40    HeartRateSensor        3       3       3       1                  0
#>  5 BLEv40    MovementFilter         3       3       3       1                  1
#>  6 BLEv40    OLED                   3       3       3       1                  3
#>  7 BLEv40    Screen                 3       3       3       1                  1
#>  8 BLEv42    BT40                   3       3       3       1                  0
#>  9 BLEv42    CapacityButton         3       3       3       1                  3
#> 10 BLEv42    HeartRateSensor        3       3       3       1                  1
#> # ℹ 126 more rows
#> # ℹ 1 more variable: linked <lgl>