You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In computing the local assortativity for signed, unweighted networks, local_assortativity_wu_sign executes the following two lines r_pos = assortativity_wei(W * (W > 0)) r_neg = assortativity_wei(W * (W < 0))
np.isnan(r_neg).any()) would return True no matter what network I input into this function.
In the second line, the array passed to assortativity_wei has strictly negative values. In assortativity_wei, we compute i, j = np.where(np.triu(CIJ, 1) > 0)
This will always give back i = j = 0. I would get divide by 0 warnings when this function divided by K = len(i) in later steps.
I made the methods functional by adding a negative sign to the argument where we find r_neg, i.e., r_neg = assortativity_wei(-W * (W < 0))
But I don't know if this compromises the statistics.
The text was updated successfully, but these errors were encountered:
In computing the local assortativity for signed, unweighted networks,
local_assortativity_wu_sign
executes the following two linesr_pos = assortativity_wei(W * (W > 0))
r_neg = assortativity_wei(W * (W < 0))
np.isnan(r_neg).any())
would return True no matter what network I input into this function.In the second line, the array passed to
assortativity_wei
has strictly negative values. Inassortativity_wei
, we computei, j = np.where(np.triu(CIJ, 1) > 0)
This will always give back i = j = 0. I would get divide by 0 warnings when this function divided by K = len(i) in later steps.
I made the methods functional by adding a negative sign to the argument where we find r_neg, i.e.,
r_neg = assortativity_wei(-W * (W < 0))
But I don't know if this compromises the statistics.
The text was updated successfully, but these errors were encountered: