xgi-org / xgi

CompleX Group Interactions (XGI) is a Python package for higher-order networks.
https://xgi.readthedocs.io
Other
171 stars 27 forks source link

Made exact assortativity reproducible #526

Closed nwlandry closed 3 months ago

nwlandry commented 3 months ago

In the degree_assortativity function, when using the exact keyword, it was not reproducible because the two degrees were randomly shuffled prior to putting into the numpy.corrcoef function. NetworkX handles this by copying the pairs twice: $(u, v)$ and $(v,u )$ (See this comment). This PR fixes this issue.

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 92.19%. Comparing base (732bd85) to head (b0cf179).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #526 +/- ## ========================================== - Coverage 92.20% 92.19% -0.02% ========================================== Files 60 60 Lines 4389 4392 +3 ========================================== + Hits 4047 4049 +2 - Misses 342 343 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

nwlandry commented 3 months ago

@thomasrobiglio, do you think you will be able to review this PR? Thanks!

thomasrobiglio commented 3 months ago

hey @nwlandry, sure! I will review this afternoon or tomorrow morning :)

nwlandry commented 3 months ago

Thanks so much! I appreciate it!

nwlandry commented 3 months ago

Thanks so much for reviewing!