combatlearn 1.1.0__tar.gz → 1.1.1__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.1}/PKG-INFO +13 -18
- {combatlearn-1.1.0 → combatlearn-1.1.1}/README.md +5 -10
- combatlearn-1.1.1/combatlearn/__init__.py +5 -0
- {combatlearn-1.1.0 → combatlearn-1.1.1}/combatlearn/combat.py +354 -369
- {combatlearn-1.1.0 → combatlearn-1.1.1}/combatlearn.egg-info/PKG-INFO +13 -18
- {combatlearn-1.1.0 → combatlearn-1.1.1}/combatlearn.egg-info/SOURCES.txt +2 -0
- combatlearn-1.1.1/combatlearn.egg-info/requires.txt +19 -0
- combatlearn-1.1.1/dev_requirements.txt +3 -0
- combatlearn-1.1.1/docs_requirements.txt +5 -0
- {combatlearn-1.1.0 → combatlearn-1.1.1}/pyproject.toml +16 -15
- {combatlearn-1.1.0 → combatlearn-1.1.1}/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.1}/LICENSE +0 -0
- {combatlearn-1.1.0 → combatlearn-1.1.1}/combatlearn.egg-info/dependency_links.txt +0 -0
- {combatlearn-1.1.0 → combatlearn-1.1.1}/combatlearn.egg-info/top_level.txt +0 -0
- {combatlearn-1.1.0 → combatlearn-1.1.1}/requirements.txt +0 -0
- {combatlearn-1.1.0 → combatlearn-1.1.1}/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.1
|
|
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**
|
|
@@ -41,7 +41,7 @@ Dynamic: license-file
|
|
|
41
41
|
[](https://github.com/EttoreRocchi/combatlearn/blob/main/LICENSE)
|
|
42
42
|
|
|
43
43
|
<div align="center">
|
|
44
|
-
<p><img src="https://raw.githubusercontent.com/EttoreRocchi/combatlearn/main/docs/logo.png" alt="combatlearn logo" width="350" /></p>
|
|
44
|
+
<p><img src="https://raw.githubusercontent.com/EttoreRocchi/combatlearn/main/docs/source/_static/logo.png" alt="combatlearn logo" width="350" /></p>
|
|
45
45
|
</div>
|
|
46
46
|
|
|
47
47
|
**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 +62,11 @@ pip install combatlearn
|
|
|
62
62
|
**Full documentation is available at [combatlearn.readthedocs.io](https://combatlearn.readthedocs.io)**
|
|
63
63
|
|
|
64
64
|
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/)
|
|
65
|
+
- [Methods Guide](https://combatlearn.readthedocs.io/en/latest/methods/)
|
|
68
66
|
- [API Reference](https://combatlearn.readthedocs.io/en/latest/api/)
|
|
69
|
-
- [Examples](https://combatlearn.readthedocs.io/en/latest/examples/basic-usage/)
|
|
70
67
|
|
|
71
68
|
## Quick start
|
|
72
69
|
|
|
73
|
-
For more details, see the [Quick Start Tutorial](https://combatlearn.readthedocs.io/en/latest/quickstart/).
|
|
74
|
-
|
|
75
70
|
```python
|
|
76
71
|
import pandas as pd
|
|
77
72
|
from sklearn.pipeline import Pipeline
|
|
@@ -116,7 +111,7 @@ print("Best parameters:", grid.best_params_)
|
|
|
116
111
|
print(f"Best CV AUROC: {grid.best_score_:.3f}")
|
|
117
112
|
```
|
|
118
113
|
|
|
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)
|
|
114
|
+
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
115
|
|
|
121
116
|
## `ComBat` parameters
|
|
122
117
|
|
|
@@ -146,13 +141,13 @@ The following section provides a detailed explanation of all parameters availabl
|
|
|
146
141
|
|
|
147
142
|
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
143
|
|
|
149
|
-
For further details see the [
|
|
144
|
+
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
145
|
|
|
151
146
|
### Batch Effect Metrics
|
|
152
147
|
|
|
153
148
|
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
149
|
|
|
155
|
-
For further details see the [
|
|
150
|
+
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
151
|
|
|
157
152
|
## Contributing
|
|
158
153
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
[](https://github.com/EttoreRocchi/combatlearn/blob/main/LICENSE)
|
|
9
9
|
|
|
10
10
|
<div align="center">
|
|
11
|
-
<p><img src="https://raw.githubusercontent.com/EttoreRocchi/combatlearn/main/docs/logo.png" alt="combatlearn logo" width="350" /></p>
|
|
11
|
+
<p><img src="https://raw.githubusercontent.com/EttoreRocchi/combatlearn/main/docs/source/_static/logo.png" alt="combatlearn logo" width="350" /></p>
|
|
12
12
|
</div>
|
|
13
13
|
|
|
14
14
|
**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 +29,11 @@ pip install combatlearn
|
|
|
29
29
|
**Full documentation is available at [combatlearn.readthedocs.io](https://combatlearn.readthedocs.io)**
|
|
30
30
|
|
|
31
31
|
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/)
|
|
32
|
+
- [Methods Guide](https://combatlearn.readthedocs.io/en/latest/methods/)
|
|
35
33
|
- [API Reference](https://combatlearn.readthedocs.io/en/latest/api/)
|
|
36
|
-
- [Examples](https://combatlearn.readthedocs.io/en/latest/examples/basic-usage/)
|
|
37
34
|
|
|
38
35
|
## Quick start
|
|
39
36
|
|
|
40
|
-
For more details, see the [Quick Start Tutorial](https://combatlearn.readthedocs.io/en/latest/quickstart/).
|
|
41
|
-
|
|
42
37
|
```python
|
|
43
38
|
import pandas as pd
|
|
44
39
|
from sklearn.pipeline import Pipeline
|
|
@@ -83,7 +78,7 @@ print("Best parameters:", grid.best_params_)
|
|
|
83
78
|
print(f"Best CV AUROC: {grid.best_score_:.3f}")
|
|
84
79
|
```
|
|
85
80
|
|
|
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)
|
|
81
|
+
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
82
|
|
|
88
83
|
## `ComBat` parameters
|
|
89
84
|
|
|
@@ -113,13 +108,13 @@ The following section provides a detailed explanation of all parameters availabl
|
|
|
113
108
|
|
|
114
109
|
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
110
|
|
|
116
|
-
For further details see the [
|
|
111
|
+
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
112
|
|
|
118
113
|
### Batch Effect Metrics
|
|
119
114
|
|
|
120
115
|
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
116
|
|
|
122
|
-
For further details see the [
|
|
117
|
+
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
118
|
|
|
124
119
|
## Contributing
|
|
125
120
|
|