Open duzc-Repos opened 2 years ago
Sorry for the long delay, where is your test file
Thank you, it seems fine after I fixed it. Generally, I find two problems:
seed network A
would be modified *_gen
, e.g. euclidean_gen()
, so I add A = A.copy() at the beginning for every *_gen() function.
# example in "euclidean_gen"
for i in range(mseed, m): C = np.append(0, np.cumsum(P[u, v]))
r = np.sum(rng.random_sample()*C[-1] >= C) - 1 # modified by duzc
b[i] = r
P = Fd
#P[u[b[:i]], v[b[:i]]] = P[v[b[:i]], u[b[:i]]] = 0
P[u[b[:i+1]], v[b[:i+1]]] = P[v[b[:i+1]], u[b[:i+1]]] = 0 # modified by duzc
A[u[r], v[r]] = A[v[r], u[r]] = 1
Please help me check it if convenient.
The test file you can find in https://github.com/duzc-Repos/Code_for_Reproduction/tree/main/2021_NC_DanyalAkarca/bct_duzc_test_data and https://github.com/duzc-Repos/Code_for_Reproduction/blob/main/2021_NC_DanyalAkarca/test_bct_duzc.py are my test file
Hi, when I use the
generative_model()
function, the following error occured. I have uploaded my test file and my running environment ispython 3.8.12
,numpy 1.20.3
,scipy 1.6.2
,bctpy 0.5.2
. Please help me why this happened.