GroupMultiNeSS 0.0.1__py3-none-any.whl

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.
@@ -0,0 +1,102 @@
1
+ Metadata-Version: 2.4
2
+ Name: GroupMultiNeSS
3
+ Version: 0.0.1
4
+ Summary: GroupMultiNeSS package
5
+ Author: Alexander Kagan
6
+ Author-email: <amkagan@umich.edu>
7
+ Keywords: python,multiplex networks,multiness,latent space models
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: Intended Audience :: Education
10
+ Classifier: Programming Language :: Python :: 2
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Operating System :: MacOS :: MacOS X
13
+ Classifier: Operating System :: Microsoft :: Windows
14
+ Description-Content-Type: text/markdown
15
+ License-File: LICENSE
16
+ Requires-Dist: numpy<2
17
+ Requires-Dist: scipy
18
+ Requires-Dist: typing
19
+ Requires-Dist: joblib
20
+ Requires-Dist: matplotlib
21
+ Requires-Dist: seaborn
22
+ Requires-Dist: statsmodels
23
+ Requires-Dist: scikit-learn
24
+ Requires-Dist: more_itertools
25
+ Dynamic: author
26
+ Dynamic: author-email
27
+ Dynamic: classifier
28
+ Dynamic: description
29
+ Dynamic: description-content-type
30
+ Dynamic: keywords
31
+ Dynamic: license-file
32
+ Dynamic: requires-dist
33
+ Dynamic: summary
34
+
35
+ # GroupMultiNeSS
36
+
37
+ GroupMultiNeSS is a package for statistical modeling of multilayer networks. It implements multiple approaches allowing to extract shared, group, and individual latent structures from a collection of networks on a shared set of nodes. Specifically, it contains the implementation of fitting sampling procedures for the following models:
38
+ - GroupMultiNeSS [Kagan et al. (2025)] - likelihood based approach with nuclear norm penalization, accounts for the additional group latent structure
39
+ - MultiNeSS [[MacDonald et al. (2021)](https://arxiv.org/abs/2012.14409)] - likelihood based approach with nuclear norm penalization
40
+ - MultiNeSS [[Tian et al. (2024)](https://arxiv.org/abs/2412.02151)] - likelihood based approach with pre-estimation of latent ranks via Shared Space Hunting algorithm
41
+ - COSIE ([Arroyo et al.](https://arxiv.org/abs/1906.10026)) - spectral-based Multiple Adjacency Spectral Embedding algorithm
42
+
43
+ ## Installation
44
+
45
+ Use the package manager [pip](https://pip.pypa.io/en/stable/) to install GroupMultiNeSS.
46
+
47
+ ```bash
48
+ pip install GroupMultiNeSS
49
+ ```
50
+
51
+ ## Usage
52
+
53
+ ```python
54
+ # Imports
55
+ import numpy as np
56
+ from GroupMultiNeSS.group_multiness import GroupMultiNeSS
57
+ from GroupMultiNeSS.data_generation import GroupLatentPositionGenerator
58
+ from GroupMultiNeSS.utils import make_group_indices
59
+
60
+
61
+ # Sample true latent positions and group indices
62
+ n, M, K = 200, 16, 4
63
+ group_props = np.ones(K) / K # make ballanced groups
64
+ group_indices = make_group_indices(group_props, M)
65
+
66
+ lpg = GroupLatentPositionGenerator(n_nodes=n, n_layers=M, group_indices=group_indices)
67
+ lpg.generate(random_seed=1)
68
+
69
+ As, Ps_true, S_true, Qs_true, Rs_true = lpg.As, lpg.Ps, lpg.S, lpg.Qs, lpg.Rs
70
+
71
+ # Fit GroupMultiNeSS model and compute the relative errors with ground-truth
72
+ group_multiness = GroupMultiNeSS(group_indices, n_jobs=K)
73
+ group_multiness.fit(As, lr=0.8)
74
+ print(group_multiness.make_final_error_report(S_true, Qs_true, Rs_true, Ps=Ps_true))
75
+
76
+ # {'Shared component': 0.026, 'Group components': 0.051, 'Individual components': 0.122, 'Ps': 0.077}
77
+ ```
78
+
79
+
80
+ ## License
81
+
82
+ MIT License
83
+
84
+ Copyright (c) 2024 Alexander Kagan
85
+
86
+ Permission is hereby granted, free of charge, to any person obtaining a copy
87
+ of this software and associated documentation files (the "Software"), to deal
88
+ in the Software without restriction, including without limitation the rights
89
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
90
+ copies of the Software, and to permit persons to whom the Software is
91
+ furnished to do so, subject to the following conditions:
92
+
93
+ The above copyright notice and this permission notice shall be included in all
94
+ copies or substantial portions of the Software.
95
+
96
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
97
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
98
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
99
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
100
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
101
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
102
+ SOFTWARE.
@@ -0,0 +1,13 @@
1
+ GroupMultiNeSS/MASE.py,sha256=kOD-eQwmUerAGP_A8clsY_3qgP87udskfc60sOsjpgI,2567
2
+ GroupMultiNeSS/__init__.py,sha256=WZ2Do-k-PX1OypOsY3c_D4QnusQWKJSBoXkCLbu-Bcw,184
3
+ GroupMultiNeSS/base.py,sha256=-7hMNbIYmmDMbnKBwk1co3LJbzd_zHhj8RlZUzffGoY,13201
4
+ GroupMultiNeSS/data_generation.py,sha256=rsibPtIP0MRD-q1gYm5ZfAuizkZ_aqAlxVxW6JWmQl8,10054
5
+ GroupMultiNeSS/group_multiness.py,sha256=SUkDtKI68NwbViz2W5aRkIY5lBMcSecA3sRCGTkiGuw,20682
6
+ GroupMultiNeSS/multiness.py,sha256=HhPVYyczCfTyYexXePREpjHyMTW1lTiLYYawp94P7-c,51730
7
+ GroupMultiNeSS/shared_space_hunting.py,sha256=UECCojow7_T3PTwni6z4yvGtl-FW8LZ6kLqd9A4j5Ts,11358
8
+ GroupMultiNeSS/utils.py,sha256=Pf7L98BOu-5lwJzfps3eLb68O-cqoLY4LJgrdq8Sm9w,14376
9
+ groupmultiness-0.0.1.dist-info/licenses/LICENSE,sha256=-hCOCPtJQua-P_LOnoVJqiUdoSPaXVfTuZK9hUgRhP4,1073
10
+ groupmultiness-0.0.1.dist-info/METADATA,sha256=8VPsWjPXsPYS0n3cHR9QoIzRokbpSGGXoF13Fam-St8,4105
11
+ groupmultiness-0.0.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
12
+ groupmultiness-0.0.1.dist-info/top_level.txt,sha256=7O72OAwdClTmr42odDwkGp_eIkoUCO69Ou8MOHQqRV4,15
13
+ groupmultiness-0.0.1.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Alexander Kagan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
@@ -0,0 +1 @@
1
+ GroupMultiNeSS