combatlearn 1.1.0__tar.gz → 1.1.2__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.
- {combatlearn-1.1.0 → combatlearn-1.1.2}/PKG-INFO +13 -19
- {combatlearn-1.1.0 → combatlearn-1.1.2}/README.md +5 -11
- combatlearn-1.1.2/combatlearn/__init__.py +5 -0
- {combatlearn-1.1.0 → combatlearn-1.1.2}/combatlearn/combat.py +358 -375
- {combatlearn-1.1.0 → combatlearn-1.1.2}/combatlearn.egg-info/PKG-INFO +13 -19
- {combatlearn-1.1.0 → combatlearn-1.1.2}/combatlearn.egg-info/SOURCES.txt +2 -0
- combatlearn-1.1.2/combatlearn.egg-info/requires.txt +19 -0
- combatlearn-1.1.2/dev_requirements.txt +3 -0
- combatlearn-1.1.2/docs_requirements.txt +5 -0
- {combatlearn-1.1.0 → combatlearn-1.1.2}/pyproject.toml +16 -15
- {combatlearn-1.1.0 → combatlearn-1.1.2}/tests/test_combat.py +66 -69
- combatlearn-1.1.0/combatlearn/__init__.py +0 -5
- combatlearn-1.1.0/combatlearn.egg-info/requires.txt +0 -19
- {combatlearn-1.1.0 → combatlearn-1.1.2}/LICENSE +0 -0
- {combatlearn-1.1.0 → combatlearn-1.1.2}/combatlearn.egg-info/dependency_links.txt +0 -0
- {combatlearn-1.1.0 → combatlearn-1.1.2}/combatlearn.egg-info/top_level.txt +0 -0
- {combatlearn-1.1.0 → combatlearn-1.1.2}/requirements.txt +0 -0
- {combatlearn-1.1.0 → combatlearn-1.1.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: combatlearn
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.2
|
|
4
4
|
Summary: Batch-effect harmonization for machine learning frameworks.
|
|
5
5
|
Author-email: Ettore Rocchi <ettoreroc@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -21,14 +21,14 @@ Requires-Dist: nbformat>=4.2
|
|
|
21
21
|
Requires-Dist: umap-learn>=0.5
|
|
22
22
|
Provides-Extra: dev
|
|
23
23
|
Requires-Dist: pytest>=7; extra == "dev"
|
|
24
|
-
Requires-Dist:
|
|
25
|
-
Requires-Dist:
|
|
26
|
-
Requires-Dist: mypy>=1.0; extra == "dev"
|
|
24
|
+
Requires-Dist: ruff>=0.8; extra == "dev"
|
|
25
|
+
Requires-Dist: pre-commit>=3.0; extra == "dev"
|
|
27
26
|
Provides-Extra: docs
|
|
28
|
-
Requires-Dist:
|
|
29
|
-
Requires-Dist:
|
|
30
|
-
Requires-Dist:
|
|
31
|
-
Requires-Dist:
|
|
27
|
+
Requires-Dist: sphinx>=7.0.0; extra == "docs"
|
|
28
|
+
Requires-Dist: pydata-sphinx-theme>=0.15.0; extra == "docs"
|
|
29
|
+
Requires-Dist: myst-parser>=3.0.0; extra == "docs"
|
|
30
|
+
Requires-Dist: sphinx-copybutton>=0.5.0; extra == "docs"
|
|
31
|
+
Requires-Dist: linkify-it-py>=2.0.0; extra == "docs"
|
|
32
32
|
Dynamic: license-file
|
|
33
33
|
|
|
34
34
|
# **combatlearn**
|
|
@@ -36,12 +36,11 @@ Dynamic: license-file
|
|
|
36
36
|
[](https://www.python.org/)
|
|
37
37
|
[](https://github.com/EttoreRocchi/combatlearn/actions/workflows/test.yaml)
|
|
38
38
|
[](https://combatlearn.readthedocs.io)
|
|
39
|
-
[](https://pepy.tech/projects/combatlearn)
|
|
40
39
|
[](https://pypi.org/project/combatlearn/)
|
|
41
40
|
[](https://github.com/EttoreRocchi/combatlearn/blob/main/LICENSE)
|
|
42
41
|
|
|
43
42
|
<div align="center">
|
|
44
|
-
<p><img src="https://raw.githubusercontent.com/EttoreRocchi/combatlearn/main/docs/logo.png" alt="combatlearn logo" width="350" /></p>
|
|
43
|
+
<p><img src="https://raw.githubusercontent.com/EttoreRocchi/combatlearn/main/docs/source/_static/logo.png" alt="combatlearn logo" width="350" /></p>
|
|
45
44
|
</div>
|
|
46
45
|
|
|
47
46
|
**combatlearn** makes the popular _ComBat_ (and _CovBat_) batch-effect correction algorithm available for use into machine learning frameworks. It lets you harmonise high-dimensional data inside a scikit-learn `Pipeline`, so that cross-validation and grid-search automatically take batch structure into account, **without data leakage**.
|
|
@@ -62,16 +61,11 @@ pip install combatlearn
|
|
|
62
61
|
**Full documentation is available at [combatlearn.readthedocs.io](https://combatlearn.readthedocs.io)**
|
|
63
62
|
|
|
64
63
|
The documentation includes:
|
|
65
|
-
- [
|
|
66
|
-
- [Quick Start Tutorial](https://combatlearn.readthedocs.io/en/latest/quickstart/)
|
|
67
|
-
- [User Guide](https://combatlearn.readthedocs.io/en/latest/user-guide/overview/)
|
|
64
|
+
- [Methods Guide](https://combatlearn.readthedocs.io/en/latest/methods/)
|
|
68
65
|
- [API Reference](https://combatlearn.readthedocs.io/en/latest/api/)
|
|
69
|
-
- [Examples](https://combatlearn.readthedocs.io/en/latest/examples/basic-usage/)
|
|
70
66
|
|
|
71
67
|
## Quick start
|
|
72
68
|
|
|
73
|
-
For more details, see the [Quick Start Tutorial](https://combatlearn.readthedocs.io/en/latest/quickstart/).
|
|
74
|
-
|
|
75
69
|
```python
|
|
76
70
|
import pandas as pd
|
|
77
71
|
from sklearn.pipeline import Pipeline
|
|
@@ -116,7 +110,7 @@ print("Best parameters:", grid.best_params_)
|
|
|
116
110
|
print(f"Best CV AUROC: {grid.best_score_:.3f}")
|
|
117
111
|
```
|
|
118
112
|
|
|
119
|
-
For a full example of how to use **combatlearn** see the [notebook demo](https://github.com/EttoreRocchi/combatlearn/blob/main/docs/demo/combatlearn_demo.ipynb)
|
|
113
|
+
For a full example of how to use **combatlearn** see the [notebook demo](https://github.com/EttoreRocchi/combatlearn/blob/main/docs/source/demo/combatlearn_demo.ipynb)
|
|
120
114
|
|
|
121
115
|
## `ComBat` parameters
|
|
122
116
|
|
|
@@ -146,13 +140,13 @@ The following section provides a detailed explanation of all parameters availabl
|
|
|
146
140
|
|
|
147
141
|
The `plot_transformation` method allows to visualize the **ComBat** transformation effect using dimensionality reduction, showing the before/after comparison of data transformed by `ComBat` using PCA, t-SNE, or UMAP to reduce dimensions for visualization.
|
|
148
142
|
|
|
149
|
-
For further details see the [
|
|
143
|
+
For further details see the [API Reference](https://combatlearn.readthedocs.io/en/latest/api/) and the [notebook demo](https://github.com/EttoreRocchi/combatlearn/blob/main/docs/source/demo/combatlearn_demo.ipynb).
|
|
150
144
|
|
|
151
145
|
### Batch Effect Metrics
|
|
152
146
|
|
|
153
147
|
The `compute_batch_metrics` method provides quantitative assessment of batch correction quality. It computes metrics including Silhouette coefficient, Davies-Bouldin index, kBET, LISI, and variance ratio for batch effect quantification, as well as k-NN preservation and distance correlation for structure preservation.
|
|
154
148
|
|
|
155
|
-
For further details see the [
|
|
149
|
+
For further details see the [API Reference](https://combatlearn.readthedocs.io/en/latest/api/) and the [notebook demo](https://github.com/EttoreRocchi/combatlearn/blob/main/docs/source/demo/combatlearn_demo.ipynb).
|
|
156
150
|
|
|
157
151
|
## Contributing
|
|
158
152
|
|
|
@@ -3,12 +3,11 @@
|
|
|
3
3
|
[](https://www.python.org/)
|
|
4
4
|
[](https://github.com/EttoreRocchi/combatlearn/actions/workflows/test.yaml)
|
|
5
5
|
[](https://combatlearn.readthedocs.io)
|
|
6
|
-
[](https://pepy.tech/projects/combatlearn)
|
|
7
6
|
[](https://pypi.org/project/combatlearn/)
|
|
8
7
|
[](https://github.com/EttoreRocchi/combatlearn/blob/main/LICENSE)
|
|
9
8
|
|
|
10
9
|
<div align="center">
|
|
11
|
-
<p><img src="https://raw.githubusercontent.com/EttoreRocchi/combatlearn/main/docs/logo.png" alt="combatlearn logo" width="350" /></p>
|
|
10
|
+
<p><img src="https://raw.githubusercontent.com/EttoreRocchi/combatlearn/main/docs/source/_static/logo.png" alt="combatlearn logo" width="350" /></p>
|
|
12
11
|
</div>
|
|
13
12
|
|
|
14
13
|
**combatlearn** makes the popular _ComBat_ (and _CovBat_) batch-effect correction algorithm available for use into machine learning frameworks. It lets you harmonise high-dimensional data inside a scikit-learn `Pipeline`, so that cross-validation and grid-search automatically take batch structure into account, **without data leakage**.
|
|
@@ -29,16 +28,11 @@ pip install combatlearn
|
|
|
29
28
|
**Full documentation is available at [combatlearn.readthedocs.io](https://combatlearn.readthedocs.io)**
|
|
30
29
|
|
|
31
30
|
The documentation includes:
|
|
32
|
-
- [
|
|
33
|
-
- [Quick Start Tutorial](https://combatlearn.readthedocs.io/en/latest/quickstart/)
|
|
34
|
-
- [User Guide](https://combatlearn.readthedocs.io/en/latest/user-guide/overview/)
|
|
31
|
+
- [Methods Guide](https://combatlearn.readthedocs.io/en/latest/methods/)
|
|
35
32
|
- [API Reference](https://combatlearn.readthedocs.io/en/latest/api/)
|
|
36
|
-
- [Examples](https://combatlearn.readthedocs.io/en/latest/examples/basic-usage/)
|
|
37
33
|
|
|
38
34
|
## Quick start
|
|
39
35
|
|
|
40
|
-
For more details, see the [Quick Start Tutorial](https://combatlearn.readthedocs.io/en/latest/quickstart/).
|
|
41
|
-
|
|
42
36
|
```python
|
|
43
37
|
import pandas as pd
|
|
44
38
|
from sklearn.pipeline import Pipeline
|
|
@@ -83,7 +77,7 @@ print("Best parameters:", grid.best_params_)
|
|
|
83
77
|
print(f"Best CV AUROC: {grid.best_score_:.3f}")
|
|
84
78
|
```
|
|
85
79
|
|
|
86
|
-
For a full example of how to use **combatlearn** see the [notebook demo](https://github.com/EttoreRocchi/combatlearn/blob/main/docs/demo/combatlearn_demo.ipynb)
|
|
80
|
+
For a full example of how to use **combatlearn** see the [notebook demo](https://github.com/EttoreRocchi/combatlearn/blob/main/docs/source/demo/combatlearn_demo.ipynb)
|
|
87
81
|
|
|
88
82
|
## `ComBat` parameters
|
|
89
83
|
|
|
@@ -113,13 +107,13 @@ The following section provides a detailed explanation of all parameters availabl
|
|
|
113
107
|
|
|
114
108
|
The `plot_transformation` method allows to visualize the **ComBat** transformation effect using dimensionality reduction, showing the before/after comparison of data transformed by `ComBat` using PCA, t-SNE, or UMAP to reduce dimensions for visualization.
|
|
115
109
|
|
|
116
|
-
For further details see the [
|
|
110
|
+
For further details see the [API Reference](https://combatlearn.readthedocs.io/en/latest/api/) and the [notebook demo](https://github.com/EttoreRocchi/combatlearn/blob/main/docs/source/demo/combatlearn_demo.ipynb).
|
|
117
111
|
|
|
118
112
|
### Batch Effect Metrics
|
|
119
113
|
|
|
120
114
|
The `compute_batch_metrics` method provides quantitative assessment of batch correction quality. It computes metrics including Silhouette coefficient, Davies-Bouldin index, kBET, LISI, and variance ratio for batch effect quantification, as well as k-NN preservation and distance correlation for structure preservation.
|
|
121
115
|
|
|
122
|
-
For further details see the [
|
|
116
|
+
For further details see the [API Reference](https://combatlearn.readthedocs.io/en/latest/api/) and the [notebook demo](https://github.com/EttoreRocchi/combatlearn/blob/main/docs/source/demo/combatlearn_demo.ipynb).
|
|
123
117
|
|
|
124
118
|
## Contributing
|
|
125
119
|
|