Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

New s_metric method #1548

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Conversation

vboussange
Copy link

@vboussange vboussange commented Mar 8, 2021

Hi there, I propose to add a new metric, so called s-metric.
This is also done in networkX.

s_metric(g; norm=true)

Return the normalised s-metric of g.
The s-metric is defined as the sum of the product of degrees between pair of nodes
for every edge in g. Ref
It is normalised by the maximum s_metric obtained from the family of graph
with similar degree distribution.
s_max is computed from an approximation formula as in https://journals.aps.org/pre/pdf/10.1103/PhysRevE.75.046102
If norm=false, no normalisation is performed.

Examples

julia> using LightGraphs
julia> s_metric(star_graph(4))
0.6

@codecov
Copy link

codecov bot commented Mar 8, 2021

Codecov Report

Merging #1548 (0de03f8) into master (e7669f2) will increase coverage by 0.06%.
The diff coverage is 100.00%.

❗ Current head 0de03f8 differs from pull request most recent head 909e2ad. Consider uploading reports for the commit 909e2ad to get more accurate results

@@            Coverage Diff             @@
##           master    #1548      +/-   ##
==========================================
+ Coverage   99.37%   99.44%   +0.06%     
==========================================
  Files         108      107       -1     
  Lines        5157     5559     +402     
==========================================
+ Hits         5125     5528     +403     
+ Misses         32       31       -1     

Victor and others added 6 commits March 8, 2021 11:00
* rich_club:
  added rich club metric
* master:
  Revert "added rich club metric"
  added rich club metric
I have been messing up with the branches in my pull requests, trying to solve this now
@vboussange vboussange changed the title added s_metric method New s_metric method Mar 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant