Repository navigation
Conversation
Add jaccard_coefficient, adamic_adar_index, resource_allocation_index, preferential_attachment and common_neighbor_centrality. The common neighbors of every pair come from one product, A @ A.T, masked by the distinct pairs so that no other entry is formed; with each column weighted by 1 / degree or 1 / log(degree) the same product gives the two sums. common_neighbor_centrality with an alpha other than 1 adds a breadth-first search from each distinct node at the end of the pairs that has fewer of them. The answers are NetworkX's: a generator that checks ebunch when called and scores when read, so an iterator ebunch is used up by the check; the int 0 where NetworkX sums nothing; a self-loop counted twice in a degree; and a pair that cannot be scored raising only when reached. Without an ebunch the pairs come in the order of nx.non_edges, each node's partners scored together. The three scores that read a community node attribute are left to NetworkX.
Open
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## dispatch-followups #116 +/- ##
======================================================
+ Coverage 91.63% 92.01% +0.37%
======================================================
Files 161 165 +4
Lines 9601 10083 +482
Branches 1154 1186 +32
======================================================
+ Hits 8798 9278 +480
- Misses 554 556 +2
Partials 249 249 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add the link prediction scores. The common-neighbor ones come from one masked product of the adjacency with its transpose;
preferential_attachmentandcommon_neighbor_centralityare computed from degrees and pair distances. They follow NetworkX's generator semantics and ordering of pairs.jaccard_coefficient,adamic_adar_index,resource_allocation_index,preferential_attachment,common_neighbor_centrality(a non-numericalphaother than 1 is declined)Stacked on #115.