R/compare_robustness.R
compare_robustness.Rd
This function is designed to be used with a list of parameters
as the one given by the function get_lbm_param()
. The default
parameters are designed such that the return value for a uniform extinction
sequence is bounded above by 0.5.
compare_robustness(
list_param,
dens = 0.0156,
new_nr = 100,
new_nc = 100,
ext_seq = "uniform"
)
A list of list of LBM parameters, each list must contain at
list con
, pi
and rho
entries, such as the one returned
by the function get_lbm_param()
. The size of the network is
optional.
The density (connectance) used to compare the network. The
com
parameters of list_param
will be normalized so that the
average probability of interaction in the network is equal to dens
.
Default to 0.0156.
The number of rows of the normalized networks. Default to 100.
The number of columns of the normalized networks. Default to 100.
The distribution of the primary extinction sequence used to
compare the networks. One of c("uniform", "decreasing", "increasing")
.
Default to "uniform"
.
A list of the sames length as list_param
, the robustness (AUC)
after normalization for all set of parameters.
par1 <- list(con = matrix(c(.5,.3,.3,.1), 2, 2),
pi = c(.25,.75),
rho = c(1/3, 2/3))
par2 <- list(con = matrix(c(.4,.1,.1,.4), 2, 2),
pi = c(.25,.75),
rho = c(1/2, 1/2))
compare_robustness(list_param = list(par1, par2), ext_seq = "decreasing")
#> [[1]]
#> [1] 0.4099056
#>
#> [[2]]
#> [1] 0.4918904
#>
compare_robustness(list_param = list(par1, par2), ext_seq = "increasing")
#> [[1]]
#> [1] 0.5466856
#>
#> [[2]]
#> [1] 0.4918904
#>