Skip to content

Commit 7a844c0

Browse files
Add MinimumSpanningTree algorithm and update export info
Added MinimumSpanningTree algorithm and updated export section.
1 parent c67f884 commit 7a844c0

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ This will usually be followed by a custom combination of one or multiple **opera
4343
**k-Nearest Neighrbor (KNN)** based edge selections. This will keep only top-*k* neighbors per node. Optionally, it requires **mutual** edges using top-`mutual_k`.
4444
* `WeightThreshold(threshold, mode="distance"|"similarity")`
4545
Basic (or "naive") sparsification algorithm that simply applies a **global weight threshold**. Only edges with weight `< threshold` (distance) or `> threshold` (similarity) will be kept.
46+
* `MinimumSpanningTree()`
47+
This is another fundamental algorithm to reduce graph connectivity which can be slow for large and highly-connected graphs, though. Currently the implementation is in essence using the scipy-implementation under the hood.
4648
* `DoublyStochastic(tolerance=1e-5, max_iter=10000)`
4749
**Sinkhorn–Knopp** alternating row/column normalization to make the adjacency (approximately) **doubly stochastic** without densifying (CSR-only). Can be useful as a normalization step before backboning/thresholding.
4850
Ref: Sinkhorn (1964); discussed in Coscia, "The Atlas for the Inspiring Network Scientist" (2025).
@@ -112,9 +114,15 @@ G_refined = NoiseCorrected().apply(G0_sim)
112114
```
113115

114116

115-
### 3) Export when needed
117+
### 3) Convert or export when needed
116118

119+
`graphconstructor.Graph` objects can easily be converted to networkx or igraph central objects:
117120
```python
118121
nx_graph = G_pruned.to_networkx() # nx.Graph or nx.DiGraph
119122
ig_graph = G_pruned.to_igraph() # igraph.Graph
120123
```
124+
125+
Graphs can also be exported to **graphml**:
126+
```python
127+
G_pruned.to_graphml("test_graph.graphml")
128+
```

0 commit comments

Comments
 (0)