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

Update dispatch decorator for hits to use "weight" edge weight #7081

Merged
merged 1 commit into from Nov 1, 2023

Conversation

eriknw
Copy link
Contributor

@eriknw eriknw commented Nov 1, 2023

"weight" edge weight is currently fixed.

Copy link
Member

@MridulS MridulS left a comment

Choose a reason for hiding this comment

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

I wonder if we should expose weight in hits API. We would probably just need to change A = nx.adjacency_matrix(G, nodelist=list(G), dtype=float) to A = nx.adjacency_matrix(G, nodelist=list(G), dtype=float, weight=weight) in the implementation (assuming weighted HITS makes sense)

Copy link
Member

@dschult dschult left a comment

Choose a reason for hiding this comment

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

It makes good sense to me to add a 'weight' input to the hits algorithm. I'm quite surprised that it isn't there already.

This PR can be merged as is. Let's make a separate one that adds that (keyword-only)
input, changes this dispatch decorator accordingly, and changes the algorithm to use weighted adjacency matrices. :)

@rossbar rossbar merged commit 314adcb into networkx:main Nov 1, 2023
36 of 37 checks passed
@jarrodmillman jarrodmillman added this to the 3.3 milestone Nov 1, 2023
cvanelteren pushed a commit to cvanelteren/networkx that referenced this pull request Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

5 participants