Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated the return type of Katz centrality #530

Merged
merged 2 commits into from
Apr 4, 2024
Merged

Updated the return type of Katz centrality #530

merged 2 commits into from
Apr 4, 2024

Conversation

nwlandry
Copy link
Collaborator

@nwlandry nwlandry commented Apr 3, 2024

This PR accomplishes the following:

  • katz_centrality now returns a dictionary to be consistent with all other centrality measures.
  • The Katz centrality is now 1-normalized consistent with other functions
  • katz_centrality is now a nodestat as well.

Copy link

codecov bot commented Apr 3, 2024

Codecov Report

Attention: Patch coverage is 86.66667% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 92.12%. Comparing base (369a10a) to head (eb3258b).

Files Patch % Lines
xgi/stats/nodestats.py 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #530      +/-   ##
==========================================
- Coverage   92.19%   92.12%   -0.07%     
==========================================
  Files          60       60              
  Lines        4392     4393       +1     
==========================================
- Hits         4049     4047       -2     
- Misses        343      346       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@thomasrobiglio thomasrobiglio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! We should mention that the values that are returned are normalised, can you add that?

@nwlandry
Copy link
Collaborator Author

nwlandry commented Apr 4, 2024

Looks good! We should mention that the values that are returned are normalised, can you add that?

I have mentioned that centralities are 1-normalized in the Returns field.

@nwlandry
Copy link
Collaborator Author

nwlandry commented Apr 4, 2024

Thanks for the review!!

@nwlandry nwlandry merged commit b717e4b into main Apr 4, 2024
24 checks passed
@nwlandry nwlandry deleted the update-katz branch April 4, 2024 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

katz centrality should return the same data type as the other centrality measures
2 participants