Skip to contents

Are the hubs the same from one version to the next? For each step: the rank correlation of how many features require each kept feature, and how many of the top most required stay among the top most required.

Usage

vp_hub_stability(history, top = 50)

Arguments

history

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

top

How many of the most required features count as hubs.

Value

A tibble with step, from, to, spearman and top_kept.

Examples

gens <- c("miband1", "miband2", "miband3", "miband4", "miband6")
history <- vp_history(
  vp_example(paste0(gens, "_realized.uvl")),
  versions = gens,
  or_graph = TRUE
)
vp_hub_stability(history, top = 5)
#> # A tibble: 4 × 5
#>    step from    to      spearman top_kept
#>   <int> <fct>   <fct>      <dbl>    <int>
#> 1     1 miband1 miband2   NA            0
#> 2     2 miband2 miband3    0.894        4
#> 3     3 miband3 miband4    0.297        3
#> 4     4 miband4 miband6    0.302        3