[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 583: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 639: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
Gephi forums •Calculate nearest neighbor degree?
Page 1 of 1

Calculate nearest neighbor degree?

Posted: 08 Nov 2012 16:35
by emmalijohansson
I am pulling out some statistics from my network, but can't manage to figure out how to get the nearest neighbor degree, or average nearest neighbor degrees.

Anyone who knows? I'd be more than happy if!

Re: Calculate nearest neighbor degree?

Posted: 08 Nov 2012 17:24
by admin
What is this metric?

Re: Calculate nearest neighbor degree?

Posted: 09 Nov 2012 08:22
by emmalijohansson
I have a network where the nodes represent countries and the edges represent the "trade of land", weighted in hectares.

It's a directed network and some nodes are both targets and investors (sources)
Ex.
Indonesia has a node degree of 10 as it has 7 investors, but are investing in 3 countries itself. I want to be able to calculate the average node degree of Indonesia's nearest neighbors, and get this statistic for all nodes as a separate column in the data lab. Is this possible?

Re: Calculate nearest neighbor degree?

Posted: 09 Nov 2012 10:32
by admin
It's not available, but you may code a metric plugin for it, or code some lines of python using Networkx.

Notice that the average is an unreliable statistic as it is very sensitive to outliers. You may better compute the median instead.

Re: Calculate nearest neighbor degree?

Posted: 15 Nov 2012 14:05
by gmagerman
Hi,

Sebastien is right about the average especially when relating to power law distributions. However, the ANND or ANNS (avg nearest neighbor degree or -strength resp.) are used some times to estimate a degree of assortativity in the network: i.e. are higher degree nodes more likely to be connected to higher degree nodes.

Thank you for the code links, it might be good to estimate both & see the differences in real networks....