Skip to main content
added 10 characters in body
Source Link
kjetil b halvorsen
  • 82.8k
  • 32
  • 201
  • 663

A little bit late but hopefully this can help someone else.

The assortativityassortativity function from igraphigraph gives you the correlation between knn(k) and k, which is slightly negative in this case (-0.16) considering its values can range from 0 to 1.

The knnknn function gives you the knn only, not k. So when you plot knnnet$knnknnnet$knn, you are plotting knn against an index assigned to each vertex. Your graph probably has around 80 vertices, that's why the x axis goes until 80.

toTo get the actual assortativity plot, try this: plot(degree(net), knnnet$knn, xlab = "k", ylab = "knn(k)")plot(degree(net), knnnet$knn, xlab = "k", ylab = "knn(k)"). The plot should show more clearly the negative correlation.

A little bit late but hopefully this can help someone else.

The assortativity function from igraph gives you the correlation between knn(k) and k, which is slightly negative in this case (-0.16) considering its values can range from 0 to 1.

The knn function gives you the knn only, not k. So when you plot knnnet$knn, you are plotting knn against an index assigned to each vertex. Your graph probably has around 80 vertices, that's why the x axis goes until 80.

to get the actual assortativity plot, try this: plot(degree(net), knnnet$knn, xlab = "k", ylab = "knn(k)"). The plot should show more clearly the negative correlation.

A little bit late but hopefully this can help someone else.

The assortativity function from igraph gives you the correlation between knn(k) and k, which is slightly negative in this case (-0.16) considering its values can range from 0 to 1.

The knn function gives you the knn only, not k. So when you plot knnnet$knn, you are plotting knn against an index assigned to each vertex. Your graph probably has around 80 vertices, that's why the x axis goes until 80.

To get the actual assortativity plot, try this: plot(degree(net), knnnet$knn, xlab = "k", ylab = "knn(k)"). The plot should show more clearly the negative correlation.

Source Link

A little bit late but hopefully this can help someone else.

The assortativity function from igraph gives you the correlation between knn(k) and k, which is slightly negative in this case (-0.16) considering its values can range from 0 to 1.

The knn function gives you the knn only, not k. So when you plot knnnet$knn, you are plotting knn against an index assigned to each vertex. Your graph probably has around 80 vertices, that's why the x axis goes until 80.

to get the actual assortativity plot, try this: plot(degree(net), knnnet$knn, xlab = "k", ylab = "knn(k)"). The plot should show more clearly the negative correlation.