The eras of a history: the split of its versions into k runs of consecutive versions that are as alike as possible inside each run. Exact (dynamic programming) for the criterion of k-means: the sum, over the eras, of the distances between every two versions of the era (vp_version_distance()) divided by the number of its versions. A boundary between two eras is where the model changed course.
Usage
vp_eras(history, k = 3, graph = c("requires", "excludes", "atleastone"))Arguments
- history
A history: the versions of a model, from
vp_read_history()orvp_history(), oldest first.- k
The number of eras.
- graph
Which graph:
"requires","excludes"or"atleastone"(the last one needsor_graph = TRUEinvp_generate()).
Value
A tibble with version, era (1 to k) and spread (the mean
distance between the versions of its era).
See also
Other evolution:
vp_attachment(),
vp_auc(),
vp_changed_links(),
vp_co_change(),
vp_community_history(),
vp_compare(),
vp_disruptions(),
vp_edit_type(),
vp_feature_churn(),
vp_feature_states(),
vp_flip_flops(),
vp_forecast_size(),
vp_growth(),
vp_history_apply(),
vp_history_changes(),
vp_history_sizes(),
vp_hub_stability(),
vp_interaction_changes(),
vp_life_cycle(),
vp_link_lifetime(),
vp_prediction_table(),
vp_rename(),
vp_rename_candidates(),
vp_ripple(),
vp_state_moves(),
vp_top_movers(),
vp_version_distance()
Examples
gens <- c("miband1", "miband2", "miband3", "miband4", "miband6")
history <- vp_history(
vp_example(paste0(gens, "_realized.uvl")),
versions = gens,
or_graph = TRUE
)
vp_eras(history, k = 2)
#> # A tibble: 5 × 3
#> version era spread
#> <fct> <int> <dbl>
#> 1 miband1 1 0.323
#> 2 miband2 1 0.323
#> 3 miband3 1 0.323
#> 4 miband4 1 0.323
#> 5 miband6 2 0