dadapy 0.3.3__tar.gz → 0.4.0__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 (64) hide show
  1. dadapy-0.4.0/PKG-INFO +235 -0
  2. {dadapy-0.3.3 → dadapy-0.4.0}/README.md +53 -11
  3. dadapy-0.4.0/dadapy/__init__.py +46 -0
  4. dadapy-0.4.0/dadapy/_cython/cython_clustering.c +18700 -0
  5. dadapy-0.4.0/dadapy/_cython/cython_clustering_v2.c +19543 -0
  6. dadapy-0.4.0/dadapy/_cython/cython_density.c +13725 -0
  7. {dadapy-0.3.3 → dadapy-0.4.0}/dadapy/_cython/cython_differentiable_imbalance.c +13215 -12802
  8. {dadapy-0.3.3 → dadapy-0.4.0}/dadapy/_cython/cython_distances.c +14066 -13524
  9. {dadapy-0.3.3 → dadapy-0.4.0}/dadapy/_cython/cython_grads.c +17782 -17790
  10. dadapy-0.4.0/dadapy/_cython/cython_maximum_likelihood_opt.c +13505 -0
  11. dadapy-0.4.0/dadapy/_cython/cython_maximum_likelihood_opt_full.c +13787 -0
  12. {dadapy-0.3.3 → dadapy-0.4.0}/dadapy/_cython/cython_overlap.c +13564 -12946
  13. {dadapy-0.3.3 → dadapy-0.4.0}/dadapy/_utils/density_estimation.py +4 -20
  14. {dadapy-0.3.3 → dadapy-0.4.0}/dadapy/_utils/discrete_functions.py +2 -2
  15. {dadapy-0.3.3 → dadapy-0.4.0}/dadapy/_utils/id_estimation.py +24 -30
  16. {dadapy-0.3.3 → dadapy-0.4.0}/dadapy/_utils/metric_comparisons.py +80 -3
  17. {dadapy-0.3.3 → dadapy-0.4.0}/dadapy/_utils/utils.py +10 -8
  18. {dadapy-0.3.3 → dadapy-0.4.0}/dadapy/base.py +10 -8
  19. dadapy-0.4.0/dadapy/causal_graph.py +1310 -0
  20. {dadapy-0.3.3 → dadapy-0.4.0}/dadapy/clustering.py +16 -11
  21. dadapy-0.4.0/dadapy/data.py +81 -0
  22. {dadapy-0.3.3 → dadapy-0.4.0}/dadapy/data_sets.py +8 -9
  23. {dadapy-0.3.3 → dadapy-0.4.0}/dadapy/density_advanced.py +35 -31
  24. {dadapy-0.3.3 → dadapy-0.4.0}/dadapy/density_estimation.py +71 -27
  25. dadapy-0.4.0/dadapy/diff_imbalance.py +1521 -0
  26. {dadapy-0.3.3 → dadapy-0.4.0}/dadapy/feature_weighting.py +39 -19
  27. {dadapy-0.3.3 → dadapy-0.4.0}/dadapy/hamming.py +62 -46
  28. {dadapy-0.3.3 → dadapy-0.4.0}/dadapy/id_discrete.py +19 -16
  29. {dadapy-0.3.3 → dadapy-0.4.0}/dadapy/id_estimation.py +10 -7
  30. dadapy-0.3.3/dadapy/metric_comparisons.py → dadapy-0.4.0/dadapy/information_imbalance.py +62 -288
  31. dadapy-0.4.0/dadapy/kstar.py +312 -0
  32. dadapy-0.4.0/dadapy/metric_comparisons.py +34 -0
  33. {dadapy-0.3.3 → dadapy-0.4.0}/dadapy/neigh_graph.py +28 -27
  34. dadapy-0.4.0/dadapy/neighborhood_overlap.py +265 -0
  35. {dadapy-0.3.3 → dadapy-0.4.0}/dadapy/plot.py +15 -36
  36. dadapy-0.4.0/dadapy.egg-info/PKG-INFO +235 -0
  37. {dadapy-0.3.3 → dadapy-0.4.0}/dadapy.egg-info/SOURCES.txt +2 -0
  38. dadapy-0.4.0/dadapy.egg-info/requires.txt +16 -0
  39. dadapy-0.4.0/pyproject.toml +37 -0
  40. {dadapy-0.3.3 → dadapy-0.4.0}/setup.cfg +1 -8
  41. dadapy-0.4.0/setup.py +69 -0
  42. dadapy-0.3.3/PKG-INFO +0 -393
  43. dadapy-0.3.3/dadapy/__init__.py +0 -20
  44. dadapy-0.3.3/dadapy/_cython/cython_clustering.c +0 -17536
  45. dadapy-0.3.3/dadapy/_cython/cython_clustering_v2.c +0 -18424
  46. dadapy-0.3.3/dadapy/_cython/cython_density.c +0 -11695
  47. dadapy-0.3.3/dadapy/_cython/cython_maximum_likelihood_opt.c +0 -11922
  48. dadapy-0.3.3/dadapy/_cython/cython_maximum_likelihood_opt_full.c +0 -12157
  49. dadapy-0.3.3/dadapy/causal_graph.py +0 -849
  50. dadapy-0.3.3/dadapy/data.py +0 -219
  51. dadapy-0.3.3/dadapy/diff_imbalance.py +0 -1532
  52. dadapy-0.3.3/dadapy/kstar.py +0 -125
  53. dadapy-0.3.3/dadapy.egg-info/PKG-INFO +0 -393
  54. dadapy-0.3.3/dadapy.egg-info/requires.txt +0 -22
  55. dadapy-0.3.3/pyproject.toml +0 -31
  56. dadapy-0.3.3/setup.py +0 -120
  57. {dadapy-0.3.3 → dadapy-0.4.0}/LICENSE +0 -0
  58. {dadapy-0.3.3 → dadapy-0.4.0}/dadapy/_utils/__init__.py +0 -0
  59. {dadapy-0.3.3 → dadapy-0.4.0}/dadapy/_utils/differentiable_imbalance.py +0 -0
  60. {dadapy-0.3.3 → dadapy-0.4.0}/dadapy/_utils/discrete_volumes/L_coefficients_exact.dat +0 -0
  61. {dadapy-0.3.3 → dadapy-0.4.0}/dadapy/_utils/discrete_volumes/L_coefficients_float.dat +0 -0
  62. {dadapy-0.3.3 → dadapy-0.4.0}/dadapy/_utils/discrete_volumes/V_exact.dat +0 -0
  63. {dadapy-0.3.3 → dadapy-0.4.0}/dadapy.egg-info/dependency_links.txt +0 -0
  64. {dadapy-0.3.3 → dadapy-0.4.0}/dadapy.egg-info/top_level.txt +0 -0
dadapy-0.4.0/PKG-INFO ADDED
@@ -0,0 +1,235 @@
1
+ Metadata-Version: 2.4
2
+ Name: dadapy
3
+ Version: 0.4.0
4
+ Summary: Distance-based Analysis of DAta-manifolds in python
5
+ Author: DADApy author
6
+ License-Expression: Apache-2.0
7
+ Project-URL: homepage, https://github.com/sissa-data-science/DADApy
8
+ Project-URL: documentation, https://dadapy.readthedocs.io/
9
+ Project-URL: repository, https://github.com/sissa-data-science/DADApy
10
+ Requires-Python: >=3.10
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: numpy>=1.22
14
+ Requires-Dist: scipy
15
+ Requires-Dist: scikit-learn
16
+ Requires-Dist: matplotlib
17
+ Requires-Dist: seaborn
18
+ Requires-Dist: tqdm
19
+ Requires-Dist: networkx
20
+ Requires-Dist: jax
21
+ Requires-Dist: flax
22
+ Requires-Dist: optax
23
+ Provides-Extra: dev
24
+ Requires-Dist: tox; extra == "dev"
25
+ Requires-Dist: black; extra == "dev"
26
+ Requires-Dist: isort; extra == "dev"
27
+ Requires-Dist: pytest; extra == "dev"
28
+ Dynamic: license-file
29
+
30
+ <img src="https://raw.githubusercontent.com/sissa-data-science/DADApy/master/logo/logo_1_horizontal_transparent_v2.png" width="500">
31
+
32
+ [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
33
+ [![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
34
+ [![codecov](https://codecov.io/gh/sissa-data-science/DADApy/branch/main/graph/badge.svg?token=X4M0KWAPO5)](https://codecov.io/gh/sissa-data-science/DADApy)
35
+ ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/sissa-data-science/dadapy/test.yml?label=test)
36
+ ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/sissa-data-science/dadapy/lint.yml?label=lint)
37
+ ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/sissa-data-science/dadapy/lint.yml?label=docs)
38
+
39
+ DADApy is a Python package for the characterization of manifolds in high-dimensional spaces.
40
+
41
+
42
+ # Homepage
43
+ For more details and tutorials, visit the homepage at:
44
+ [https://dadapy.readthedocs.io/](https://dadapy.readthedocs.io/)
45
+
46
+ # Quick Example
47
+
48
+ ```python
49
+ import numpy as np
50
+ from dadapy.data import Data
51
+
52
+ # Generate a simple 3D gaussian dataset
53
+ X = np.random.normal(0, 1, (1000, 3))
54
+
55
+ # initialize the "Data" class with the set of coordinates
56
+ data = Data(X)
57
+
58
+ # compute distances up to the 100th nearest neighbor
59
+ data.compute_distances(maxk=100)
60
+
61
+ # compute the intrinsic dimension using 2nn estimator
62
+ id_twonn, id_error, id_distance = data.compute_id_2NN()
63
+
64
+ # compute the intrinsic dimension up to the 64th nearest neighbors using Gride
65
+ id_gride_list, id_error_list, id_distance_list = data.return_id_scaling_gride(range_max=64)
66
+
67
+ # compute the density using PAk, a point adaptive kNN estimator
68
+ log_den, log_den_error = data.compute_density_PAk()
69
+
70
+ # find the peaks of the density profile through the ADP algorithm
71
+ cluster_assignment = data.compute_clustering_ADP()
72
+
73
+ # compute the neighborhood overlap with another dataset
74
+ X2 = np.random.normal(0, 1, (1000, 5))
75
+ overlap_x2 = data.return_data_overlap(X2)
76
+
77
+ # compute the information imbalance with another dataset
78
+ ii_x2 = data.return_information_imbalance(X2)
79
+
80
+ # compute the neighborhood overlap with a set of labels
81
+ labels = np.repeat(np.arange(10), 100)
82
+ overlap_labels = data.return_label_overlap(labels, k=10)
83
+ ```
84
+
85
+ The Data class is just container of classes. If you need to work with a specific module
86
+ you can equivalently import it directly.
87
+
88
+ ```python
89
+ import numpy as np
90
+ from dadapy import IdEstimation
91
+
92
+ # Generate a simple 3D gaussian dataset
93
+ X = np.random.normal(0, 1, (1000, 3))
94
+
95
+ # initialize the "Data" class with the set of coordinates
96
+ ie = IdEstimation(X)
97
+
98
+ # compute the intrinsic dimension up to the 64th nearest neighbors using Gride
99
+ id_list, id_error_list, id_distance_list = ie.return_id_scaling_gride(range_max=64)
100
+
101
+ ```
102
+
103
+ This allows to work more naturally with data comparison methods.
104
+
105
+ ```python
106
+ import numpy as np
107
+ from dadapy import NeighborhoodOverlap
108
+
109
+ # Generate a simple 3D gaussian dataset
110
+ X = np.random.normal(0, 1, (1000, 3))
111
+ X2 = np.random.normal(0, 1, (1000, 5))
112
+ labels = np.repeat(np.arange(10), 100)
113
+
114
+ # compute the neighborhood overlap with another dataset
115
+ no = NeighborhoodOverlap(X, X2)
116
+ overlap_x2 = no.return_data_overlap()
117
+
118
+ # compute the neighborhood overlap with a set of labels
119
+ no = NeighborhoodOverlap(X, labels = labels)
120
+ overlap_x2 = no.return_label_overlap(k=10)
121
+
122
+ ```
123
+
124
+
125
+
126
+ # Currently implemented algorithms
127
+
128
+ - Intrinsic dimension estimators
129
+ -
130
+ - Two-NN estimator
131
+ > Facco et al., *Scientific Reports* (2017)
132
+ - Gride estimator
133
+ > Denti et al., *Scientific Reports* (2022)
134
+ - I3D estimator (for both continuous and discrete spaces)
135
+ > Macocco et al., *Physical Review Letters* (2023)
136
+ - BID estimator
137
+ > Acevedo et al., *Communications Physics* (2025)
138
+
139
+ - Density estimators
140
+ -
141
+ - kNN estimator
142
+ - k*NN estimator (kNN with an adaptive choice of k)
143
+ - PAk estimator
144
+ > Rodriguez et al., *JCTC* (2018)
145
+ - point-adaptive mean-shift gradient estimator
146
+ > Carli et al., *ArXiv* (2024)
147
+ - BMTI estimator
148
+ > Carli et al., *ArXiv* (2024)
149
+
150
+ - Density peaks clustering methods
151
+ -
152
+ - Density peaks clustering
153
+ > Rodriguez and Laio, *Science* (2014)
154
+ - Advanced density peaks clustering
155
+ > d’Errico et al., *Information Sciences* (2021)
156
+ - k-peak clustering
157
+ > Sormani, Rodriguez and Laio, *JCTC* (2020)
158
+
159
+ - Manifold comparison tools
160
+ -
161
+ - Neighbourhood overlap
162
+ > Doimo et al., *NeurIPS* (2020)
163
+ - Information imbalance
164
+ > Glielmo et al., *PNAS Nexus* (2022)
165
+
166
+ - Feature selection and weighting tool
167
+ -
168
+ - Differentiable Information Imbalance
169
+ > Wild et al., *Nature Communications* (2025)
170
+
171
+ - Causal analysis tools
172
+ -
173
+ - Imbalance Gain
174
+ > Del Tatto et al., *PNAS* (2024)
175
+ - Community causal graph
176
+ > Allione et al., *Physical Review Letters* (2025)
177
+
178
+ # Installation
179
+ The package is compatible with the Python versions 3.10, 3.11, 3.12, 3.13, and 3.14.
180
+ We currently only support Unix-based systems, including Linux and macOS.
181
+ For Windows machines, we suggest using the [Windows Subsystem for Linux (WSL)](https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux).
182
+
183
+ The package requires `numpy`, `scipy`, `scikit-learn`, `jax`, `jaxlib`, and `matplotlib` for the visualizations.
184
+
185
+ The package contains Cython-generated C extensions that are automatically compiled during installation.
186
+
187
+ The latest release is available through pip:
188
+
189
+ ```sh
190
+ pip install dadapy
191
+ ```
192
+
193
+ To install the latest development version, clone the source code from GitHub
194
+ and install it with pip as follows:
195
+
196
+ ```sh
197
+ pip install git+https://github.com/sissa-data-science/DADApy
198
+ ```
199
+
200
+ Alternatively, if you'd like to modify the implementation of some function locally, you can download the repository and install the package with:
201
+
202
+ ```sh
203
+ git clone https://github.com/sissa-data-science/DADApy.git
204
+ cd DADApy
205
+ python setup.py build_ext --inplace
206
+ pip install .
207
+ ```
208
+
209
+ The methods of the classes ```DiffImbalance``` and ```CausalGraph``` can be run on a 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:
210
+
211
+ ```sh
212
+ pip install --upgrade "jax[cuda12_pip]==0.4.30" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
213
+ ```
214
+
215
+ 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).
216
+
217
+
218
+ # Citing DADApy
219
+
220
+ A description of the package is available [here](https://www.sciencedirect.com/science/article/pii/S2666389922002070).
221
+
222
+ Please consider citing it if you found this package useful for your research:
223
+
224
+ ```bib
225
+ @article{dadapy,
226
+ title = {DADApy: Distance-based analysis of data-manifolds in Python},
227
+ journal = {Patterns},
228
+ pages = {100589},
229
+ year = {2022},
230
+ issn = {2666-3899},
231
+ doi = {https://doi.org/10.1016/j.patter.2022.100589},
232
+ url = {https://www.sciencedirect.com/science/article/pii/S2666389922002070},
233
+ author = {Aldo Glielmo and Iuri Macocco and Diego Doimo and Matteo Carli and Claudio Zeni and Romina Wild and Maria d’Errico and Alex Rodriguez and Alessandro Laio},
234
+ }
235
+ ```
@@ -30,10 +30,10 @@ data = Data(X)
30
30
  data.compute_distances(maxk=100)
31
31
 
32
32
  # compute the intrinsic dimension using 2nn estimator
33
- id, id_error, id_distance = data.compute_id_2NN()
33
+ id_twonn, id_error, id_distance = data.compute_id_2NN()
34
34
 
35
35
  # compute the intrinsic dimension up to the 64th nearest neighbors using Gride
36
- id_list, id_error_list, id_distance_list = data.return_id_scaling_gride(range_max=64)
36
+ id_gride_list, id_error_list, id_distance_list = data.return_id_scaling_gride(range_max=64)
37
37
 
38
38
  # compute the density using PAk, a point adaptive kNN estimator
39
39
  log_den, log_den_error = data.compute_density_PAk()
@@ -45,12 +45,55 @@ cluster_assignment = data.compute_clustering_ADP()
45
45
  X2 = np.random.normal(0, 1, (1000, 5))
46
46
  overlap_x2 = data.return_data_overlap(X2)
47
47
 
48
+ # compute the information imbalance with another dataset
49
+ ii_x2 = data.return_information_imbalance(X2)
50
+
48
51
  # compute the neighborhood overlap with a set of labels
49
52
  labels = np.repeat(np.arange(10), 100)
50
- overlap_labels = data.return_label_overlap(labels)
53
+ overlap_labels = data.return_label_overlap(labels, k=10)
54
+ ```
55
+
56
+ The Data class is just container of classes. If you need to work with a specific module
57
+ you can equivalently import it directly.
58
+
59
+ ```python
60
+ import numpy as np
61
+ from dadapy import IdEstimation
62
+
63
+ # Generate a simple 3D gaussian dataset
64
+ X = np.random.normal(0, 1, (1000, 3))
65
+
66
+ # initialize the "Data" class with the set of coordinates
67
+ ie = IdEstimation(X)
68
+
69
+ # compute the intrinsic dimension up to the 64th nearest neighbors using Gride
70
+ id_list, id_error_list, id_distance_list = ie.return_id_scaling_gride(range_max=64)
71
+
72
+ ```
73
+
74
+ This allows to work more naturally with data comparison methods.
75
+
76
+ ```python
77
+ import numpy as np
78
+ from dadapy import NeighborhoodOverlap
79
+
80
+ # Generate a simple 3D gaussian dataset
81
+ X = np.random.normal(0, 1, (1000, 3))
82
+ X2 = np.random.normal(0, 1, (1000, 5))
83
+ labels = np.repeat(np.arange(10), 100)
84
+
85
+ # compute the neighborhood overlap with another dataset
86
+ no = NeighborhoodOverlap(X, X2)
87
+ overlap_x2 = no.return_data_overlap()
88
+
89
+ # compute the neighborhood overlap with a set of labels
90
+ no = NeighborhoodOverlap(X, labels = labels)
91
+ overlap_x2 = no.return_label_overlap(k=10)
51
92
 
52
93
  ```
53
94
 
95
+
96
+
54
97
  # Currently implemented algorithms
55
98
 
56
99
  - Intrinsic dimension estimators
@@ -62,7 +105,7 @@ overlap_labels = data.return_label_overlap(labels)
62
105
  - I3D estimator (for both continuous and discrete spaces)
63
106
  > Macocco et al., *Physical Review Letters* (2023)
64
107
  - BID estimator
65
- > Acevedo et al., *Nature Communications Physics* (2025)
108
+ > Acevedo et al., *Communications Physics* (2025)
66
109
 
67
110
  - Density estimators
68
111
  -
@@ -101,15 +144,14 @@ overlap_labels = data.return_label_overlap(labels)
101
144
  - Imbalance Gain
102
145
  > Del Tatto et al., *PNAS* (2024)
103
146
  - Community causal graph
104
- > Allione et al., arXiv (2025)
147
+ > Allione et al., *Physical Review Letters* (2025)
105
148
 
106
149
  # Installation
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.
150
+ The package is compatible with the Python versions 3.10, 3.11, 3.12, 3.13, and 3.14.
109
151
  We currently only support Unix-based systems, including Linux and macOS.
110
152
  For Windows machines, we suggest using the [Windows Subsystem for Linux (WSL)](https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux).
111
153
 
112
- The package requires `numpy`, `scipy`, `scikit-learn`, `jax`, `jaxlib` and `matplotlib` for the visualizations.
154
+ The package requires `numpy`, `scipy`, `scikit-learn`, `jax`, `jaxlib`, and `matplotlib` for the visualizations.
113
155
 
114
156
  The package contains Cython-generated C extensions that are automatically compiled during installation.
115
157
 
@@ -126,7 +168,7 @@ and install it with pip as follows:
126
168
  pip install git+https://github.com/sissa-data-science/DADApy
127
169
  ```
128
170
 
129
- Alternatively, if you'd like to modify the implementation of some function locally you can download the repository and install the package with:
171
+ Alternatively, if you'd like to modify the implementation of some function locally, you can download the repository and install the package with:
130
172
 
131
173
  ```sh
132
174
  git clone https://github.com/sissa-data-science/DADApy.git
@@ -135,13 +177,13 @@ python setup.py build_ext --inplace
135
177
  pip install .
136
178
  ```
137
179
 
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:
180
+ The methods of the classes ```DiffImbalance``` and ```CausalGraph``` can be run on a 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
181
 
140
182
  ```sh
141
183
  pip install --upgrade "jax[cuda12_pip]==0.4.30" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
142
184
  ```
143
185
 
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).
186
+ 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
187
 
146
188
 
147
189
  # Citing DADApy
@@ -0,0 +1,46 @@
1
+ """DADApy: a Python package for Distance-based Analysis of DAta-manifolds."""
2
+
3
+ from ._utils.utils import * # noqa: F401,F403
4
+ from .base import Base
5
+ from .clustering import Clustering
6
+ from .data import Data
7
+ from .data_sets import DataSets
8
+ from .density_advanced import DensityAdvanced
9
+ from .density_estimation import DensityEstimation
10
+ from .feature_weighting import FeatureWeighting
11
+ from .id_discrete import IdDiscrete
12
+ from .id_estimation import IdEstimation
13
+ from .information_imbalance import InformationImbalance
14
+ from .kstar import KStar
15
+ from .metric_comparisons import MetricComparisons
16
+ from .neigh_graph import NeighGraph
17
+ from .neighborhood_overlap import NeighborhoodOverlap
18
+
19
+ __all__ = [
20
+ "Base",
21
+ "Clustering",
22
+ "Data",
23
+ "DataSets",
24
+ "DensityAdvanced",
25
+ "DensityEstimation",
26
+ "FeatureWeighting",
27
+ "IdDiscrete",
28
+ "IdEstimation",
29
+ "InformationImbalance",
30
+ "KStar",
31
+ "MetricComparisons",
32
+ "NeighGraph",
33
+ "NeighborhoodOverlap",
34
+ ]
35
+
36
+ try:
37
+ from .causal_graph import CausalGraph
38
+ from .diff_imbalance import DiffImbalance
39
+ from .hamming import BID, Hamming
40
+
41
+ __all__ += ["CausalGraph", "DiffImbalance", "BID", "Hamming"]
42
+ except (ImportError, RuntimeError):
43
+ # JAX-dependent classes unavailable (e.g., this exception is raised in
44
+ # joblib worker subprocesses where GPU context cannot be re-initialized
45
+ # from the parent process).
46
+ pass