-
Notifications
You must be signed in to change notification settings - Fork 166
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
Generalizing Closeness
centrality to weighted networks using Newman method
#1385
Conversation
Signed-off-by: FedericoBruzzone <[email protected]>
Closeness
centrality to weighted networks using newman methodCloseness
centrality to weighted networks using Newman method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
THe implemenation LGTM for rustworkx-core, do you intend to make the method available for Pytohn users though?
I left a comment about the tests. It applies to all of our centrality metrics, we need to be careful with floats
Thanks for the review. I do not actually need the python implementation, but I can understand that this could improve usability for Python users. So, I will work on exposing the method to Python as well. Regarding the tests, I appreciate the feedback. I'll make sure to add checks that account for floating-point precision issues across all centrality metrics. |
1fb850f
to
b364913
Compare
@IvanIsCoding Make sure that the following commit is in line with the rest, but most importantly, make sure it is correct. Make available weighted_closeness for python users Why is CI not starting? 🤔 |
81813f3
to
7de1312
Compare
I need to manually approve CI. Also, I asked about Python just to confirm. Someone else can work on the Python bindings. |
There was no problem to implement it. It was a pleasure, I look forward to your review :D |
0bc11f9
to
95c0166
Compare
Pull Request Test Coverage Report for Build 13320423785Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some minor details.
Also, let me know if you want to work on Python tests & the release note. I can do it if you want to focus on the rustworkx-core
core. Adding support for Python are additional extra steps that can be delegated to a separate PR
c344424
to
3fc34ac
Compare
Signed-off-by: FedericoBruzzone <[email protected]>
431bc6f
to
e1f9418
Compare
What are the additional steps beyond those made in this PR? Are they documented anywhere? I did not see them in the CONTRIBUTING file. This should be my task and I would like to do it 😄
If you can do that it is better, I will as soon as I can maybe implement the betweeness or the other method for closeness. Just out of curiosity, is it documented anywhere how to do release notes? |
The additional steps are compared to the work of adding just Rust code vs adding Python support. For Python:
Because we have Rust tests, I am ok with merging the PR without Python tests and adding them later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set up the weight_fn
to be None
by default to agree with the type annotations and we should be good to go. Also, default_weight=1.0
makes the function behave like the unweighted version when no weight function is passed
Signed-off-by: FedericoBruzzone <[email protected]>
Signed-off-by: FedericoBruzzone <[email protected]>
Signed-off-by: FedericoBruzzone <[email protected]>
e1f9418
to
6836056
Compare
Signed-off-by: FedericoBruzzone <[email protected]>
ce2f2d8
to
865b498
Compare
We should be good to go 😄 |
Signed-off-by: FedericoBruzzone <[email protected]>
c804774
to
e72acb5
Compare
releasenotes/notes/newman-weighted-closeness-centrality-d4dba79712e9ac42.yaml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good to go
I hope to find more time to do more PRs. Thanks for the review! |
Close #1384