Repository navigation
Conversation
The graph algorithms page only said that algorithms such as Dijkstra use the weights. In icebug 13.6 some algorithms ignore them without a warning, one refuses weighted graphs, and two need an editable copy that keeps the weights. List each, note which limits need icebug changes, and test weighted betweenness, Louvain and the copy.
Deploying lance-csr with
|
| Latest commit: |
32a11ea
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://22529e45.lance-csr.pages.dev |
| Branch Preview URL: | https://docs-weighted-icebug-algorit.lance-csr.pages.dev |
This branch has not been deployed
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.
Why
#200 added edge weights to
export_graph, and the docs said only that algorithms "such asib.distance.Dijkstra" use them. That left readers to guess about the rest, and #200's note "Not covered: icebug's weighted community detection or centrality beyond Dijkstra" read as if the export didn't support them. It does: onceGraph.fromCSRgets the weight arrays, icebug decides per algorithm whether to read them. Some algorithms in icebug 13.6 ignore them without a warning, one refuses a weighted graph, and two need an editable copy. This PR says which is which.What changed
The graph algorithms page gets a "Weighted algorithms in icebug" section:
Betweenness,PLM(Louvain) andParallelLeidenuse them;KadabraBetweenness,TopClosenessandSpanningForestdon't.ApproxElectricalClosenessraises an error on a weighted graph.SpanningEdgeCentralityandflow.EdmondsKarpneedindexEdges(), which fails on a read-onlyfromCSRgraph. They run onib.Graph(graph, weighted=True, directed=...); withoutweighted=Truethe copy drops the weights.indexEdges()onfromCSRgraphs, and the ignoring algorithms need weighted versions in icebug.Three new icebug tests check the claims: weighted betweenness takes the cheap route only, Louvain separates two groups of a complete graph by weight alone, and the copy keeps the weights (a max flow of 6 against 2 with unit capacities) while a plain copy drops them. Like the existing icebug tests, they skip when icebug isn't installed.
Validation
uv run --no-sync --with icebug==13.6 --with networkx pytest python/tests/test_graph_export.py -k icebug; the Louvain test passed 15 runs out of 15.make lint,docs/check_snippets.py,zensical build --strictandtypos: pass. CI hasn't run yet.🤖 Generated with Claude Code