[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[igraph] Assortativity value NaN for regular networks

From: Borja Esteve-Altava
Subject: [igraph] Assortativity value NaN for regular networks
Date: Mon, 2 Apr 2018 09:36:55 +0100

Hi everyone,

I want to use the assortativity degree as a ways of estimating the level of homogeneity / heterogeneity of real networks:
1 = homogeneous (all vertices having degree k, they all connect to vertices with degree k)
-1 = heterogeneous

It seems to work fine for the extreme case of heterogeneity:

> assortativity_degree(make_star(25, mode = "undirected"), directed=FALSE)
[1] -1

However, for the other extreme of homogeneity (e.g., regular networks) the function assortativity_degree() does not return a value of 1, but a NaN.

> assortativity_degree(make_lattice(c(1, 5, 5), circular=T), directed=FALSE)
[1] NaN

When I tried to do an "almost-regular" network by deleting one edge in the regular, instead of getting a close to 1 value I got a close to 0 value.

> assortativity_degree(make_lattice(c(1, 5, 5), circular = T) %>% delete_edges(1), directed=F)
[1] -0.06521739

Any clue why regular networks do not show values of 1?
Am I missing something about how assortativity is calculated?

Thanks a lot!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]