google-research / graphworld

Apache License 2.0
171 stars 28 forks source link

[About graph / node label metrics' reference] #6

Open tingwl0122 opened 2 years ago

tingwl0122 commented 2 years ago

I am interested in analyzing some dataset's graph and node label metrics. However, some of those did not include a reference, such as graphworld/src/graph_world/metrics/graph_metrics.py/feature_homogeneity. Is it possible to include where these functions (metrics) come from and what they mean? Thank you!

jpalowitch commented 2 years ago

Hi, thanks for the interest. The code formatting & documentation are still being refined and updated. The feature_homogeneity currently returns averages of (1) within-class angular feature similarity and (2) between-class angular feature similarity. Specifically,

inavg = avg{i,j: c(i)==c(j)} 1.0 - angular_distance(x_i, x_j) outavg = avg{i,j: c(i)=/=c(j)} 1.0 - angular_distance(x_i, x_j)

tingwl0122 commented 2 years ago

Thanks for your detailed response! I will take a look at it.