combatlearn 1.1.2__tar.gz → 1.3.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.
- {combatlearn-1.1.2 → combatlearn-1.3.0}/PKG-INFO +27 -16
- {combatlearn-1.1.2 → combatlearn-1.3.0}/README.md +24 -14
- combatlearn-1.3.0/combatlearn/__init__.py +5 -0
- combatlearn-1.3.0/combatlearn/core.py +619 -0
- combatlearn-1.3.0/combatlearn/metrics.py +814 -0
- combatlearn-1.3.0/combatlearn/sklearn_api.py +277 -0
- combatlearn-1.3.0/combatlearn/visualization.py +643 -0
- {combatlearn-1.1.2 → combatlearn-1.3.0}/combatlearn.egg-info/PKG-INFO +27 -16
- {combatlearn-1.1.2 → combatlearn-1.3.0}/combatlearn.egg-info/SOURCES.txt +4 -1
- {combatlearn-1.1.2 → combatlearn-1.3.0}/combatlearn.egg-info/requires.txt +2 -1
- {combatlearn-1.1.2 → combatlearn-1.3.0}/docs_requirements.txt +1 -1
- {combatlearn-1.1.2 → combatlearn-1.3.0}/pyproject.toml +0 -1
- {combatlearn-1.1.2 → combatlearn-1.3.0}/requirements.txt +1 -0
- {combatlearn-1.1.2 → combatlearn-1.3.0}/tests/test_combat.py +366 -1
- combatlearn-1.1.2/combatlearn/__init__.py +0 -5
- combatlearn-1.1.2/combatlearn/combat.py +0 -1770
- {combatlearn-1.1.2 → combatlearn-1.3.0}/LICENSE +0 -0
- {combatlearn-1.1.2 → combatlearn-1.3.0}/combatlearn.egg-info/dependency_links.txt +0 -0
- {combatlearn-1.1.2 → combatlearn-1.3.0}/combatlearn.egg-info/top_level.txt +0 -0
- {combatlearn-1.1.2 → combatlearn-1.3.0}/dev_requirements.txt +0 -0
- {combatlearn-1.1.2 → combatlearn-1.3.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: combatlearn
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3.0
|
|
4
4
|
Summary: Batch-effect harmonization for machine learning frameworks.
|
|
5
5
|
Author-email: Ettore Rocchi <ettoreroc@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -16,6 +16,7 @@ Requires-Dist: pandas>=1.3
|
|
|
16
16
|
Requires-Dist: numpy>=1.21
|
|
17
17
|
Requires-Dist: scikit-learn>=1.2
|
|
18
18
|
Requires-Dist: matplotlib>=3.4
|
|
19
|
+
Requires-Dist: seaborn>=0.12
|
|
19
20
|
Requires-Dist: plotly>=5.0
|
|
20
21
|
Requires-Dist: nbformat>=4.2
|
|
21
22
|
Requires-Dist: umap-learn>=0.5
|
|
@@ -26,7 +27,7 @@ Requires-Dist: pre-commit>=3.0; extra == "dev"
|
|
|
26
27
|
Provides-Extra: docs
|
|
27
28
|
Requires-Dist: sphinx>=7.0.0; extra == "docs"
|
|
28
29
|
Requires-Dist: pydata-sphinx-theme>=0.15.0; extra == "docs"
|
|
29
|
-
Requires-Dist: myst-
|
|
30
|
+
Requires-Dist: myst-nb>=1.1.0; extra == "docs"
|
|
30
31
|
Requires-Dist: sphinx-copybutton>=0.5.0; extra == "docs"
|
|
31
32
|
Requires-Dist: linkify-it-py>=2.0.0; extra == "docs"
|
|
32
33
|
Dynamic: license-file
|
|
@@ -61,8 +62,8 @@ pip install combatlearn
|
|
|
61
62
|
**Full documentation is available at [combatlearn.readthedocs.io](https://combatlearn.readthedocs.io)**
|
|
62
63
|
|
|
63
64
|
The documentation includes:
|
|
64
|
-
- [Methods Guide](https://combatlearn.readthedocs.io/en/latest/methods
|
|
65
|
-
- [API Reference](https://combatlearn.readthedocs.io/en/latest/api
|
|
65
|
+
- [Methods Guide](https://combatlearn.readthedocs.io/en/latest/methods.html)
|
|
66
|
+
- [API Reference](https://combatlearn.readthedocs.io/en/latest/api.html)
|
|
66
67
|
|
|
67
68
|
## Quick start
|
|
68
69
|
|
|
@@ -76,7 +77,7 @@ from combatlearn import ComBat
|
|
|
76
77
|
df = pd.read_csv("data.csv", index_col=0)
|
|
77
78
|
X, y = df.drop(columns="y"), df["y"]
|
|
78
79
|
|
|
79
|
-
batch = pd.read_csv("batch.csv", index_col=0
|
|
80
|
+
batch = pd.read_csv("batch.csv", index_col=0).squeeze("columns")
|
|
80
81
|
diag = pd.read_csv("diagnosis.csv", index_col=0) # categorical
|
|
81
82
|
age = pd.read_csv("age.csv", index_col=0) # continuous
|
|
82
83
|
|
|
@@ -158,21 +159,31 @@ Pull requests, bug reports, and feature ideas are welcome: feel free to open a P
|
|
|
158
159
|
|
|
159
160
|
[Google Scholar](https://scholar.google.com/citations?user=MKHoGnQAAAAJ) | [Scopus](https://www.scopus.com/authid/detail.uri?authorId=57220152522)
|
|
160
161
|
|
|
161
|
-
## Acknowledgements
|
|
162
162
|
|
|
163
|
-
|
|
164
|
-
We gratefully acknowledge:
|
|
163
|
+
## Citation
|
|
165
164
|
|
|
166
|
-
|
|
167
|
-
- [**neuroCombat**](https://github.com/Jfortin1/neuroCombat)
|
|
168
|
-
- [**CovBat**](https://github.com/andy1764/CovBat_Harmonization)
|
|
165
|
+
If **combatlearn** is useful in your research, please cite the paper introducing this Python package:
|
|
169
166
|
|
|
170
|
-
|
|
167
|
+
> Rocchi, E., Nicitra, E., Calvo, M. et al. Combining mass spectrometry and machine learning models for predicting Klebsiella pneumoniae antimicrobial resistance: a multicenter experience from clinical isolates in Italy. BMC Microbiol (2026). https://doi.org/10.1186/s12866-025-04657-2
|
|
168
|
+
|
|
169
|
+
```bibtex
|
|
170
|
+
@article{Rocchi2026,
|
|
171
|
+
author = {Rocchi, Ettore and Nicitra, Emanuele and Calvo, Maddalena and Cento, Valeria and Peiretti, Laura and Asif, Zian and Menchinelli, Giulia and Posteraro, Brunella and Sala, Claudia and Colosimo, Claudia and Cricca, Monica and Sambri, Vittorio and Sanguinetti, Maurizio and Castellani, Gastone and Stefani, Stefania},
|
|
172
|
+
title = {Combining mass spectrometry and machine learning models for predicting Klebsiella pneumoniae antimicrobial resistance: a multicenter experience from clinical isolates in Italy},
|
|
173
|
+
journal = {BMC Microbiology},
|
|
174
|
+
year = {2026},
|
|
175
|
+
doi = {10.1186/s12866-025-04657-2},
|
|
176
|
+
url = {https://doi.org/10.1186/s12866-025-04657-2}
|
|
177
|
+
}
|
|
178
|
+
```
|
|
171
179
|
|
|
172
|
-
|
|
180
|
+
## Acknowledgements
|
|
181
|
+
|
|
182
|
+
This project builds on the excellent work of the ComBat family of harmonisation methods.
|
|
183
|
+
Please consider citing the original papers:
|
|
173
184
|
|
|
174
|
-
- Johnson WE, Li C, Rabinovic A.
|
|
185
|
+
- [**ComBat**](https://rdrr.io/bioc/sva/man/ComBat.html) - Johnson WE, Li C, Rabinovic A. _Biostatistics_. 2007. doi: [10.1093/biostatistics/kxj037](https://doi.org/10.1093/biostatistics/kxj037)
|
|
175
186
|
|
|
176
|
-
-
|
|
187
|
+
- [**neuroCombat**](https://github.com/Jfortin1/neuroCombat) - Fortin JP et al. _Neuroimage_. 2018. doi: [10.1016/j.neuroimage.2017.11.024](https://doi.org/10.1016/j.neuroimage.2017.11.024)
|
|
177
188
|
|
|
178
|
-
-
|
|
189
|
+
- [**CovBat**](https://github.com/andy1764/CovBat_Harmonization) - Chen AA et al. _Hum Brain Mapp_. 2022. doi: [10.1002/hbm.25688](https://doi.org/10.1002/hbm.25688)
|
|
@@ -28,8 +28,8 @@ pip install combatlearn
|
|
|
28
28
|
**Full documentation is available at [combatlearn.readthedocs.io](https://combatlearn.readthedocs.io)**
|
|
29
29
|
|
|
30
30
|
The documentation includes:
|
|
31
|
-
- [Methods Guide](https://combatlearn.readthedocs.io/en/latest/methods
|
|
32
|
-
- [API Reference](https://combatlearn.readthedocs.io/en/latest/api
|
|
31
|
+
- [Methods Guide](https://combatlearn.readthedocs.io/en/latest/methods.html)
|
|
32
|
+
- [API Reference](https://combatlearn.readthedocs.io/en/latest/api.html)
|
|
33
33
|
|
|
34
34
|
## Quick start
|
|
35
35
|
|
|
@@ -43,7 +43,7 @@ from combatlearn import ComBat
|
|
|
43
43
|
df = pd.read_csv("data.csv", index_col=0)
|
|
44
44
|
X, y = df.drop(columns="y"), df["y"]
|
|
45
45
|
|
|
46
|
-
batch = pd.read_csv("batch.csv", index_col=0
|
|
46
|
+
batch = pd.read_csv("batch.csv", index_col=0).squeeze("columns")
|
|
47
47
|
diag = pd.read_csv("diagnosis.csv", index_col=0) # categorical
|
|
48
48
|
age = pd.read_csv("age.csv", index_col=0) # continuous
|
|
49
49
|
|
|
@@ -125,21 +125,31 @@ Pull requests, bug reports, and feature ideas are welcome: feel free to open a P
|
|
|
125
125
|
|
|
126
126
|
[Google Scholar](https://scholar.google.com/citations?user=MKHoGnQAAAAJ) | [Scopus](https://www.scopus.com/authid/detail.uri?authorId=57220152522)
|
|
127
127
|
|
|
128
|
-
## Acknowledgements
|
|
129
128
|
|
|
130
|
-
|
|
131
|
-
We gratefully acknowledge:
|
|
129
|
+
## Citation
|
|
132
130
|
|
|
133
|
-
|
|
134
|
-
- [**neuroCombat**](https://github.com/Jfortin1/neuroCombat)
|
|
135
|
-
- [**CovBat**](https://github.com/andy1764/CovBat_Harmonization)
|
|
131
|
+
If **combatlearn** is useful in your research, please cite the paper introducing this Python package:
|
|
136
132
|
|
|
137
|
-
|
|
133
|
+
> Rocchi, E., Nicitra, E., Calvo, M. et al. Combining mass spectrometry and machine learning models for predicting Klebsiella pneumoniae antimicrobial resistance: a multicenter experience from clinical isolates in Italy. BMC Microbiol (2026). https://doi.org/10.1186/s12866-025-04657-2
|
|
134
|
+
|
|
135
|
+
```bibtex
|
|
136
|
+
@article{Rocchi2026,
|
|
137
|
+
author = {Rocchi, Ettore and Nicitra, Emanuele and Calvo, Maddalena and Cento, Valeria and Peiretti, Laura and Asif, Zian and Menchinelli, Giulia and Posteraro, Brunella and Sala, Claudia and Colosimo, Claudia and Cricca, Monica and Sambri, Vittorio and Sanguinetti, Maurizio and Castellani, Gastone and Stefani, Stefania},
|
|
138
|
+
title = {Combining mass spectrometry and machine learning models for predicting Klebsiella pneumoniae antimicrobial resistance: a multicenter experience from clinical isolates in Italy},
|
|
139
|
+
journal = {BMC Microbiology},
|
|
140
|
+
year = {2026},
|
|
141
|
+
doi = {10.1186/s12866-025-04657-2},
|
|
142
|
+
url = {https://doi.org/10.1186/s12866-025-04657-2}
|
|
143
|
+
}
|
|
144
|
+
```
|
|
138
145
|
|
|
139
|
-
|
|
146
|
+
## Acknowledgements
|
|
147
|
+
|
|
148
|
+
This project builds on the excellent work of the ComBat family of harmonisation methods.
|
|
149
|
+
Please consider citing the original papers:
|
|
140
150
|
|
|
141
|
-
- Johnson WE, Li C, Rabinovic A.
|
|
151
|
+
- [**ComBat**](https://rdrr.io/bioc/sva/man/ComBat.html) - Johnson WE, Li C, Rabinovic A. _Biostatistics_. 2007. doi: [10.1093/biostatistics/kxj037](https://doi.org/10.1093/biostatistics/kxj037)
|
|
142
152
|
|
|
143
|
-
-
|
|
153
|
+
- [**neuroCombat**](https://github.com/Jfortin1/neuroCombat) - Fortin JP et al. _Neuroimage_. 2018. doi: [10.1016/j.neuroimage.2017.11.024](https://doi.org/10.1016/j.neuroimage.2017.11.024)
|
|
144
154
|
|
|
145
|
-
-
|
|
155
|
+
- [**CovBat**](https://github.com/andy1764/CovBat_Harmonization) - Chen AA et al. _Hum Brain Mapp_. 2022. doi: [10.1002/hbm.25688](https://doi.org/10.1002/hbm.25688)
|