put-asunder 0.2.3__tar.gz → 0.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {put_asunder-0.2.3/put_asunder.egg-info → put_asunder-0.2.4}/PKG-INFO +10 -3
- {put_asunder-0.2.3 → put_asunder-0.2.4}/README.md +9 -2
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/__init__.py +1 -1
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/base/algorithms/community.py +9 -5
- {put_asunder-0.2.3 → put_asunder-0.2.4/put_asunder.egg-info}/PKG-INFO +10 -3
- {put_asunder-0.2.3 → put_asunder-0.2.4}/pyproject.toml +1 -1
- {put_asunder-0.2.3 → put_asunder-0.2.4}/LICENSE +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/base/__init__.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/base/algorithms/RCCS.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/base/algorithms/__init__.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/base/algorithms/core_periphery.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/base/algorithms/louvain_modified.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/base/algorithms/modular_VFD.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/base/algorithms/signed_louvain/__init__.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/base/algorithms/signed_louvain/community_detection.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/base/algorithms/signed_louvain/util.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/base/algorithms/spectral.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/base/branch_and_price/__init__.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/base/branch_and_price/branching_tree.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/base/branch_and_price/symmetry_detection.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/base/column_generation/__init__.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/base/column_generation/decomposition.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/base/column_generation/master.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/base/column_generation/subproblem.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/base/evaluation/__init__.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/base/evaluation/metrics.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/base/legacy/__init__.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/base/legacy/notebook_compat.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/base/utils/__init__.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/base/utils/graph.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/base/utils/partition_generation.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/base/visualization/__init__.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/base/visualization/graphs.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/base/visualization/matrices.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/config.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/load_balancing/__init__.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/load_balancing/algorithms/VFD.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/load_balancing/algorithms/__init__.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/load_balancing/column_generation/LB.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/load_balancing/column_generation/__init__.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/load_balancing/column_generation/master.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/load_balancing/utils/__init__.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/load_balancing/utils/partition_generation.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/nlbnp/__init__.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/nlbnp/algorithms/__init__.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/nlbnp/algorithms/core_periphery.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/nlbnp/algorithms/refinement.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/nlbnp/case_studies/__init__.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/nlbnp/case_studies/circle_cutting.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/nlbnp/case_studies/cpcong.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/nlbnp/case_studies/runner.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/nlbnp/workflow.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/orchestrator.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/solvers.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/types.py +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/put_asunder.egg-info/SOURCES.txt +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/put_asunder.egg-info/dependency_links.txt +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/put_asunder.egg-info/requires.txt +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/put_asunder.egg-info/top_level.txt +0 -0
- {put_asunder-0.2.3 → put_asunder-0.2.4}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: put-asunder
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary: Asunder: Constrained Network Structure Detection on Undirected Graphs.
|
|
5
5
|
Author-email: Allman Group <allmanaa@umich.edu>, Fortune Adekogbe <fortunea@umich.edu>
|
|
6
6
|
License-Expression: BSD-3-Clause
|
|
@@ -65,13 +65,20 @@ Base install:
|
|
|
65
65
|
python3 -m pip install put-asunder
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
Graph extras (supports ``leidenalg`` and ``igraph`` algorithms):
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
python3 -m pip install "put-asunder[graph]"
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
Graph and visualization (``matplotlib`` and ``seaborn``) extras:
|
|
69
76
|
|
|
70
77
|
```bash
|
|
71
78
|
python3 -m pip install "put-asunder[graph,viz]"
|
|
72
79
|
```
|
|
73
80
|
|
|
74
|
-
Legacy heuristics (best-effort on Python 3.13 and 3.14):
|
|
81
|
+
Legacy core periphery heuristics (best-effort on Python 3.13 and 3.14):
|
|
75
82
|
|
|
76
83
|
```bash
|
|
77
84
|
python3 -m pip install "put-asunder[legacy]"
|
|
@@ -16,13 +16,20 @@ Base install:
|
|
|
16
16
|
python3 -m pip install put-asunder
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Graph extras (supports ``leidenalg`` and ``igraph`` algorithms):
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
python3 -m pip install "put-asunder[graph]"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
Graph and visualization (``matplotlib`` and ``seaborn``) extras:
|
|
20
27
|
|
|
21
28
|
```bash
|
|
22
29
|
python3 -m pip install "put-asunder[graph,viz]"
|
|
23
30
|
```
|
|
24
31
|
|
|
25
|
-
Legacy heuristics (best-effort on Python 3.13 and 3.14):
|
|
32
|
+
Legacy core periphery heuristics (best-effort on Python 3.13 and 3.14):
|
|
26
33
|
|
|
27
34
|
```bash
|
|
28
35
|
python3 -m pip install "put-asunder[legacy]"
|
|
@@ -7,7 +7,7 @@ from asunder.orchestrator import CSDDecomposition, run_csd_decomposition
|
|
|
7
7
|
from asunder.solvers import create_solver
|
|
8
8
|
from asunder.types import DecompositionResult, IterationRecord
|
|
9
9
|
|
|
10
|
-
__version__ = "0.2.
|
|
10
|
+
__version__ = "0.2.4"
|
|
11
11
|
|
|
12
12
|
def run_evaluation(*args, **kwargs):
|
|
13
13
|
"""
|
|
@@ -413,6 +413,7 @@ def run_leidenalg(modified_A, algo='leiden', seed=42, resolution=1, verbose=Fals
|
|
|
413
413
|
seed=seed,
|
|
414
414
|
weights='weight'
|
|
415
415
|
)
|
|
416
|
+
metric = partition.quality() / modified_A.sum()
|
|
416
417
|
elif algo == "signed_leiden":
|
|
417
418
|
# uses multiplex community detection to handle negative weights
|
|
418
419
|
g_pos = ig_graph.subgraph_edges(ig_graph.es.select(weight_gt=0), delete_vertices=False)
|
|
@@ -427,9 +428,13 @@ def run_leidenalg(modified_A, algo='leiden', seed=42, resolution=1, verbose=Fals
|
|
|
427
428
|
resolution_parameter=resolution,
|
|
428
429
|
seed=seed
|
|
429
430
|
)
|
|
431
|
+
partition = layer_partitions[0]
|
|
432
|
+
|
|
430
433
|
part_pos = la.RBConfigurationVertexPartition(g_pos, weights='weight', initial_membership=layer_partitions[0], resolution_parameter=resolution)
|
|
431
434
|
part_neg = la.RBConfigurationVertexPartition(g_neg, weights='weight', initial_membership=layer_partitions[0], resolution_parameter=resolution)
|
|
432
|
-
|
|
435
|
+
m_pos = sum(g_pos.es['weight'])
|
|
436
|
+
m_neg = sum(g_neg.es['weight'])
|
|
437
|
+
metric = (1 * part_pos.quality() / m_pos) + (-1 * part_neg.quality() / m_neg)
|
|
433
438
|
elif algo == "cpm_leiden":
|
|
434
439
|
# Constant Potts Model (CPM). Resolution-limit free and handles negative weights.
|
|
435
440
|
partition = la.find_partition(
|
|
@@ -439,6 +444,7 @@ def run_leidenalg(modified_A, algo='leiden', seed=42, resolution=1, verbose=Fals
|
|
|
439
444
|
seed=seed,
|
|
440
445
|
weights='weight'
|
|
441
446
|
)
|
|
447
|
+
metric = partition.quality()
|
|
442
448
|
elif algo == "surprise_leiden":
|
|
443
449
|
partition = la.find_partition(
|
|
444
450
|
ig_graph,
|
|
@@ -446,6 +452,7 @@ def run_leidenalg(modified_A, algo='leiden', seed=42, resolution=1, verbose=Fals
|
|
|
446
452
|
seed=seed,
|
|
447
453
|
weights='weight'
|
|
448
454
|
)
|
|
455
|
+
metric = partition.quality()
|
|
449
456
|
elif algo == "signed_surprise_leiden":
|
|
450
457
|
# uses multiplex community detection to handle negative weights
|
|
451
458
|
g_pos = ig_graph.subgraph_edges(ig_graph.es.select(weight_gt=0), delete_vertices=False)
|
|
@@ -462,6 +469,7 @@ def run_leidenalg(modified_A, algo='leiden', seed=42, resolution=1, verbose=Fals
|
|
|
462
469
|
part_pos = la.SurpriseVertexPartition(g_pos, weights='weight', initial_membership=layer_partitions[0])
|
|
463
470
|
part_neg = la.SurpriseVertexPartition(g_neg, weights='weight', initial_membership=layer_partitions[0])
|
|
464
471
|
partition = layer_partitions[0]
|
|
472
|
+
metric = (1 * part_pos.quality()) + (-1 * part_neg.quality())
|
|
465
473
|
else:
|
|
466
474
|
raise(NotImplementedError("Invalid Leidenalg Algorithm."))
|
|
467
475
|
|
|
@@ -470,10 +478,6 @@ def run_leidenalg(modified_A, algo='leiden', seed=42, resolution=1, verbose=Fals
|
|
|
470
478
|
partition if algo.startswith("signed") else partition.membership
|
|
471
479
|
)
|
|
472
480
|
zii = np.equal.outer(oneD_z, oneD_z).astype(int)
|
|
473
|
-
if algo.startswith("signed"):
|
|
474
|
-
metric = (1 * part_pos.quality()) + (-1 * part_neg.quality())
|
|
475
|
-
else:
|
|
476
|
-
metric = partition.quality()
|
|
477
481
|
return zii, metric
|
|
478
482
|
|
|
479
483
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: put-asunder
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary: Asunder: Constrained Network Structure Detection on Undirected Graphs.
|
|
5
5
|
Author-email: Allman Group <allmanaa@umich.edu>, Fortune Adekogbe <fortunea@umich.edu>
|
|
6
6
|
License-Expression: BSD-3-Clause
|
|
@@ -65,13 +65,20 @@ Base install:
|
|
|
65
65
|
python3 -m pip install put-asunder
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
Graph extras (supports ``leidenalg`` and ``igraph`` algorithms):
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
python3 -m pip install "put-asunder[graph]"
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
Graph and visualization (``matplotlib`` and ``seaborn``) extras:
|
|
69
76
|
|
|
70
77
|
```bash
|
|
71
78
|
python3 -m pip install "put-asunder[graph,viz]"
|
|
72
79
|
```
|
|
73
80
|
|
|
74
|
-
Legacy heuristics (best-effort on Python 3.13 and 3.14):
|
|
81
|
+
Legacy core periphery heuristics (best-effort on Python 3.13 and 3.14):
|
|
75
82
|
|
|
76
83
|
```bash
|
|
77
84
|
python3 -m pip install "put-asunder[legacy]"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/load_balancing/column_generation/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{put_asunder-0.2.3 → put_asunder-0.2.4}/asunder/load_balancing/utils/partition_generation.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|