Skip to contents

Forecast the number of links of later versions from their number of features. The growth law is fitted on the first train versions; a cruder rule ("links per feature stay as in the last known version") is given beside it.

Usage

vp_forecast_size(history, train)

Arguments

history

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

train

How many of the first versions to fit the growth law on (at least 3, and fewer than the versions of the history).

Value

A tibble with version, links, observed, growth_law, same_ratio and the errors of both, as shares.

Examples

gens <- c("miband1", "miband2", "miband3", "miband4", "miband6")
history <- vp_history(
  vp_example(paste0(gens, "_realized.uvl")),
  versions = gens,
  or_graph = TRUE
)
vp_forecast_size(history, train = 3)
#> # A tibble: 8 × 7
#>   version links observed growth_law same_ratio error_growth_law error_same_ratio
#>   <fct>   <chr>    <int>      <dbl>      <dbl>            <dbl>            <dbl>
#> 1 miband4 requ…       32         NA      32.5                NA           0.0142
#> 2 miband6 requ…      108         NA      40.1                NA           0.629 
#> 3 miband4 excl…       35         NA      15.5                NA           0.558 
#> 4 miband6 excl…       72         NA      19.1                NA           0.735 
#> 5 miband4 skel…       11         NA       9.27               NA           0.157 
#> 6 miband6 skel…       12         NA      11.5                NA           0.0455
#> 7 miband4 prim…        6         NA       4.64               NA           0.227 
#> 8 miband6 prim…        5         NA       5.73               NA           0.145