piratepeel / MultiscaleMixing

MIT License
15 stars 7 forks source link

How to use this code to calculate multiscale assortativity for scalar attributes #2

Open KaidoZhang opened 5 years ago

KaidoZhang commented 5 years ago

Hello I saw your code example is calculating multiscale assortativity for categorical node attributes. I would like to ask if the code can be used to calculate multiscale assortativity for scalar attributes.

piratepeel commented 5 years ago

Hi, The current release does not include this feature. However, we show in the paper it is possible -- it is simply a weighted version of Pearson's correlation coefficient (where the weights are the personalised pagerank).

It should be relatively easy to code up, but I don't have much time at the moment. If you happen to implement, please submit a pull request and I'll be happy to include it.

KaidoZhang commented 4 years ago

Hi I tried to calculate the multiscale assortativity for scalar attributes according to the B4 in your paper. However, I actually want to calculate the correlation between the indegree and outdegree of a directed weighted network. I am not quite sure how to determine the k_i in B4. My understanding is that the k_i should be the outdegree of node i , I don't know if it is correct. At the same time, I don't quite understand how to calculate the mean and standard deviation in B2. Why the mean value should weighted by the degree of the node? If I need to calculate the mean value of indegree or outdegree ,this method does not seem to be the same as the calculation of the average degree. So how should I determine the k_i here indegree or outdegree? Thank you!