dadapy 0.3.1__tar.gz → 0.3.3__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.
Files changed (48) hide show
  1. {dadapy-0.3.1 → dadapy-0.3.3}/PKG-INFO +37 -7
  2. {dadapy-0.3.1 → dadapy-0.3.3}/README.md +27 -4
  3. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy/__init__.py +7 -0
  4. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy/_cython/cython_grads.c +4013 -6060
  5. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy/_utils/differentiable_imbalance.py +35 -14
  6. dadapy-0.3.3/dadapy/causal_graph.py +849 -0
  7. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy/density_advanced.py +204 -39
  8. dadapy-0.3.3/dadapy/diff_imbalance.py +1532 -0
  9. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy/feature_weighting.py +26 -16
  10. dadapy-0.3.3/dadapy/hamming.py +629 -0
  11. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy/neigh_graph.py +75 -29
  12. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy.egg-info/PKG-INFO +37 -7
  13. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy.egg-info/SOURCES.txt +3 -0
  14. dadapy-0.3.3/dadapy.egg-info/requires.txt +22 -0
  15. {dadapy-0.3.1 → dadapy-0.3.3}/pyproject.toml +10 -4
  16. dadapy-0.3.1/dadapy.egg-info/requires.txt +0 -11
  17. {dadapy-0.3.1 → dadapy-0.3.3}/LICENSE +0 -0
  18. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy/_cython/cython_clustering.c +0 -0
  19. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy/_cython/cython_clustering_v2.c +0 -0
  20. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy/_cython/cython_density.c +0 -0
  21. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy/_cython/cython_differentiable_imbalance.c +0 -0
  22. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy/_cython/cython_distances.c +0 -0
  23. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy/_cython/cython_maximum_likelihood_opt.c +0 -0
  24. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy/_cython/cython_maximum_likelihood_opt_full.c +0 -0
  25. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy/_cython/cython_overlap.c +0 -0
  26. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy/_utils/__init__.py +0 -0
  27. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy/_utils/density_estimation.py +0 -0
  28. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy/_utils/discrete_functions.py +0 -0
  29. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy/_utils/discrete_volumes/L_coefficients_exact.dat +0 -0
  30. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy/_utils/discrete_volumes/L_coefficients_float.dat +0 -0
  31. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy/_utils/discrete_volumes/V_exact.dat +0 -0
  32. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy/_utils/id_estimation.py +0 -0
  33. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy/_utils/metric_comparisons.py +0 -0
  34. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy/_utils/utils.py +0 -0
  35. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy/base.py +0 -0
  36. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy/clustering.py +0 -0
  37. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy/data.py +0 -0
  38. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy/data_sets.py +0 -0
  39. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy/density_estimation.py +0 -0
  40. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy/id_discrete.py +0 -0
  41. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy/id_estimation.py +0 -0
  42. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy/kstar.py +0 -0
  43. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy/metric_comparisons.py +0 -0
  44. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy/plot.py +0 -0
  45. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy.egg-info/dependency_links.txt +0 -0
  46. {dadapy-0.3.1 → dadapy-0.3.3}/dadapy.egg-info/top_level.txt +0 -0
  47. {dadapy-0.3.1 → dadapy-0.3.3}/setup.cfg +0 -0
  48. {dadapy-0.3.1 → dadapy-0.3.3}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: dadapy
3
- Version: 0.3.1
3
+ Version: 0.3.3
4
4
  Summary: Distance-based Analysis of DAta-manifolds in python
5
5
  Author: DADApy author
6
6
  License: Apache License
@@ -207,13 +207,20 @@ License: Apache License
207
207
  Project-URL: homepage, https://github.com/sissa-data-science/DADApy
208
208
  Project-URL: documentation, https://dadapy.readthedocs.io/
209
209
  Project-URL: repository, https://github.com/sissa-data-science/DADApy
210
- Requires-Python: >=3.7
210
+ Requires-Python: >=3.8
211
211
  Description-Content-Type: text/markdown
212
212
  Requires-Dist: numpy<2.0
213
213
  Requires-Dist: scipy
214
214
  Requires-Dist: scikit-learn
215
215
  Requires-Dist: matplotlib
216
216
  Requires-Dist: seaborn
217
+ Requires-Dist: tqdm
218
+ Requires-Dist: networkx
219
+ Requires-Dist: jax; python_version < "3.9"
220
+ Requires-Dist: jax==0.4.30; python_version >= "3.9"
221
+ Requires-Dist: jaxlib; python_version < "3.9"
222
+ Requires-Dist: jaxlib==0.4.30; python_version >= "3.9"
223
+ Requires-Dist: flax==0.8.5; python_version >= "3.9"
217
224
  Provides-Extra: dev
218
225
  Requires-Dist: tox; extra == "dev"
219
226
  Requires-Dist: black; extra == "dev"
@@ -283,14 +290,19 @@ overlap_labels = data.return_label_overlap(labels)
283
290
  > Denti et al., *Scientific Reports* (2022)
284
291
  - I3D estimator (for both continuous and discrete spaces)
285
292
  > Macocco et al., *Physical Review Letters* (2023)
293
+ - BID estimator
294
+ > Acevedo et al., *Nature Communications Physics* (2025)
295
+
286
296
  - Density estimators
287
297
  -
288
298
  - kNN estimator
289
299
  - k*NN estimator (kNN with an adaptive choice of k)
290
300
  - PAk estimator
291
301
  > Rodriguez et al., *JCTC* (2018)
302
+ - point-adaptive mean-shift gradient estimator
303
+ > Carli et al., *ArXiv* (2024)
292
304
  - BMTI estimator
293
- > Carli et al., *in preparation*
305
+ > Carli et al., *ArXiv* (2024)
294
306
 
295
307
  - Density peaks clustering methods
296
308
  -
@@ -309,15 +321,24 @@ overlap_labels = data.return_label_overlap(labels)
309
321
  > Glielmo et al., *PNAS Nexus* (2022)
310
322
 
311
323
  - Feature selection and weighting tool
312
- -
324
+ -
313
325
  - Differentiable Information Imbalance
326
+ > Wild et al., *Nature Communications* (2025)
314
327
 
328
+ - Causal analysis tools
329
+ -
330
+ - Imbalance Gain
331
+ > Del Tatto et al., *PNAS* (2024)
332
+ - Community causal graph
333
+ > Allione et al., arXiv (2025)
315
334
 
316
335
  # Installation
317
- The package is compatible with the Python versions 3.7, 3.8, 3.9, 3.10, 3.11, and 3.12. We currently only support Unix-based systems, including Linux and macOS.
336
+ The package is compatible with the Python versions 3.8, 3.9, 3.10, 3.11, and 3.12.
337
+ The methods of the classes ```DiffImbalance``` and ```CausalGraph``` are only compatible with Python>=3.9.
338
+ We currently only support Unix-based systems, including Linux and macOS.
318
339
  For Windows machines, we suggest using the [Windows Subsystem for Linux (WSL)](https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux).
319
340
 
320
- The package requires `numpy`, `scipy` and `scikit-learn`, and `matplotlib` for the visualizations.
341
+ The package requires `numpy`, `scipy`, `scikit-learn`, `jax`, `jaxlib` and `matplotlib` for the visualizations.
321
342
 
322
343
  The package contains Cython-generated C extensions that are automatically compiled during installation.
323
344
 
@@ -343,6 +364,15 @@ python setup.py build_ext --inplace
343
364
  pip install .
344
365
  ```
345
366
 
367
+ The methods of the classes ```DiffImbalance``` and ```CausalGraph``` can be run on GPU, using a suitable installation of JAX on a GPU platform. The code has been tested using JAX v0.4.30 with CUDA 12, which can be installed with:
368
+
369
+ ```sh
370
+ pip install --upgrade "jax[cuda12_pip]==0.4.30" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
371
+ ```
372
+
373
+ For more information on the installation of the JAX library on GPUs see the official [repository](https://github.com/google/jax?tab=readme-ov-file#installation).
374
+
375
+
346
376
  # Citing DADApy
347
377
 
348
378
  A description of the package is available [here](https://www.sciencedirect.com/science/article/pii/S2666389922002070).
@@ -61,14 +61,19 @@ overlap_labels = data.return_label_overlap(labels)
61
61
  > Denti et al., *Scientific Reports* (2022)
62
62
  - I3D estimator (for both continuous and discrete spaces)
63
63
  > Macocco et al., *Physical Review Letters* (2023)
64
+ - BID estimator
65
+ > Acevedo et al., *Nature Communications Physics* (2025)
66
+
64
67
  - Density estimators
65
68
  -
66
69
  - kNN estimator
67
70
  - k*NN estimator (kNN with an adaptive choice of k)
68
71
  - PAk estimator
69
72
  > Rodriguez et al., *JCTC* (2018)
73
+ - point-adaptive mean-shift gradient estimator
74
+ > Carli et al., *ArXiv* (2024)
70
75
  - BMTI estimator
71
- > Carli et al., *in preparation*
76
+ > Carli et al., *ArXiv* (2024)
72
77
 
73
78
  - Density peaks clustering methods
74
79
  -
@@ -87,15 +92,24 @@ overlap_labels = data.return_label_overlap(labels)
87
92
  > Glielmo et al., *PNAS Nexus* (2022)
88
93
 
89
94
  - Feature selection and weighting tool
90
- -
95
+ -
91
96
  - Differentiable Information Imbalance
97
+ > Wild et al., *Nature Communications* (2025)
92
98
 
99
+ - Causal analysis tools
100
+ -
101
+ - Imbalance Gain
102
+ > Del Tatto et al., *PNAS* (2024)
103
+ - Community causal graph
104
+ > Allione et al., arXiv (2025)
93
105
 
94
106
  # Installation
95
- The package is compatible with the Python versions 3.7, 3.8, 3.9, 3.10, 3.11, and 3.12. We currently only support Unix-based systems, including Linux and macOS.
107
+ The package is compatible with the Python versions 3.8, 3.9, 3.10, 3.11, and 3.12.
108
+ The methods of the classes ```DiffImbalance``` and ```CausalGraph``` are only compatible with Python>=3.9.
109
+ We currently only support Unix-based systems, including Linux and macOS.
96
110
  For Windows machines, we suggest using the [Windows Subsystem for Linux (WSL)](https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux).
97
111
 
98
- The package requires `numpy`, `scipy` and `scikit-learn`, and `matplotlib` for the visualizations.
112
+ The package requires `numpy`, `scipy`, `scikit-learn`, `jax`, `jaxlib` and `matplotlib` for the visualizations.
99
113
 
100
114
  The package contains Cython-generated C extensions that are automatically compiled during installation.
101
115
 
@@ -121,6 +135,15 @@ python setup.py build_ext --inplace
121
135
  pip install .
122
136
  ```
123
137
 
138
+ The methods of the classes ```DiffImbalance``` and ```CausalGraph``` can be run on GPU, using a suitable installation of JAX on a GPU platform. The code has been tested using JAX v0.4.30 with CUDA 12, which can be installed with:
139
+
140
+ ```sh
141
+ pip install --upgrade "jax[cuda12_pip]==0.4.30" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
142
+ ```
143
+
144
+ For more information on the installation of the JAX library on GPUs see the official [repository](https://github.com/google/jax?tab=readme-ov-file#installation).
145
+
146
+
124
147
  # Citing DADApy
125
148
 
126
149
  A description of the package is available [here](https://www.sciencedirect.com/science/article/pii/S2666389922002070).
@@ -1,3 +1,5 @@
1
+ import sys
2
+
1
3
  from ._utils.utils import *
2
4
  from .base import Base
3
5
  from .clustering import Clustering
@@ -11,3 +13,8 @@ from .id_estimation import IdEstimation
11
13
  from .kstar import KStar
12
14
  from .metric_comparisons import MetricComparisons
13
15
  from .neigh_graph import NeighGraph
16
+
17
+ if sys.version_info >= (3, 9):
18
+ from .diff_imbalance import DiffImbalance
19
+ if sys.version_info >= (3, 9):
20
+ from .causal_graph import CausalGraph