# Import netcom
library(netcom)
# Adjacency matrix
size <- 10
network <- matrix(sample(c(0,1), size = size^2, replace = TRUE), nrow = size, ncol = size)
# Calculate how similar the input network is to Small-World networks with
# a rewiring probability of 0.28.
best_fit_optim(
parameter = 0.28,
process = "SW",
network = network,
net_size = 12,
net_kind = "matrix",
mechanism_kind = "grow",
resolution = 100,
resolution_min = 0.01,
resolution_max = 0.99,
reps = 3,
power_max = 5,
connectance_max = 0.5,
divergence_max = 0.5,
mutation_max = 0.5,
cores = 1,
directed = TRUE,
method = "DD",
cause_orientation = "row",
DD_kind = c(
"in", "out", "entropy_in", "entropy_out",
"clustering_coefficient", "page_rank", "communities"
),
DD_weight = 1,
max_norm = FALSE,
verbose = FALSE
)
Run the code above in your browser using DataLab