radMLBench 1.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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024, Aydin Demircioglu
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,31 @@
1
+ Metadata-Version: 2.1
2
+ Name: radMLBench
3
+ Version: 1.0
4
+ Summary: A Python wrapper for the radMLBench data repository.
5
+ Home-page: https://github.com/aydindemircioglu/radMLBench
6
+ Author: Aydin Demircioglu
7
+ Author-email: aydin.demircioglu@uk-essen.de
8
+ License: MIT
9
+ Keywords: radiomics,data mining,benchmark,machine learning,data analysis,data sets,data science,wrapper
10
+ Classifier: Intended Audience :: Science/Research
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Programming Language :: Python :: 3.7
13
+ Requires-Python: >=3.6.0
14
+ Description-Content-Type: text/markdown
15
+ License-File: LICENSE.txt
16
+ Requires-Dist: pandas>=1.2.0
17
+ Requires-Dist: requests>=2.18.0
18
+ Requires-Dist: pyyaml>=5.2
19
+ Requires-Dist: joblib>=0.12.0
20
+ Requires-Dist: numpy>=1.18.0
21
+ Requires-Dist: scikit-learn>=0.20.0
22
+
23
+
24
+ A Python wrapper for the radMLBench data repository.
25
+
26
+ Contact
27
+ =============
28
+ If you have any questions or comments about radMLBench,
29
+ please feel free to contact us via e-mail: aydin.demircioglu@uk-essen.de
30
+
31
+ This project is hosted at https://github.com/aydindemircioglu/radMLBench
@@ -0,0 +1,150 @@
1
+ # radMLBench
2
+
3
+ This is a large collection of radiomic datasets, accessible via Python.
4
+
5
+
6
+ ## Installing radMLBench
7
+
8
+ Install it via pip:
9
+
10
+ ```
11
+ pip install radMLBench
12
+ ```
13
+
14
+
15
+ ## Datasets
16
+
17
+ All data sets are stored in a common format:
18
+
19
+ * First row is the column names
20
+ * Each following row corresponds to one row of the data
21
+ * The ID column is named `ID` (in case the original data did not supply IDs, these are simple numbers)
22
+ * The target column is named `Target`, always binary (=0,1)
23
+ * All files are compressed with `gzip` to conserve space
24
+
25
+
26
+ The complete list of datasets is
27
+
28
+ <!-- dataset table:start -->
29
+
30
+ | Dataset | Year | Modality | #Instances | #Features | Dimensionality | ClassBalance | DOI |
31
+ |:----------------------------|-------:|:-----------|-------------:|------------:|-----------------:|---------------:|:---------------------------------------------|
32
+ | Ahn2021 | 2021 | MRI | 114 | 108 | 0.96 | 55 | https://doi.org/10.1016/j.ejrad.2019.108642 |
33
+ | Arita2018 | 2018 | MRI | 168 | 684 | 4.08 | 66 | https://doi.org/10.1038/s41598-018-30273-4 |
34
+ | BraTS-2021 | 2021 | MRI | 577 | 4060 | 7.04 | 52 | https://doi.org/10.48550/arXiv.2107.02314 |
35
+ | Brancato2023 | 2023 | MRI | 58 | 2380 | 41.07 | 60 | https://doi.org/10.3390/jcm12010140 |
36
+ | C4KC-KiTS | 2021 | CT | 70 | 315 | 4.53 | 66 | https://doi.org/10.1016/j.media.2020.101821 |
37
+ | Colorectal-Liver-Metastases | 2024 | CT | 90 | 525 | 5.86 | 84 | https://doi.org/10.1038/s41597-024-02981-2 |
38
+ | Dai2023 | 2023 | CT | 119 | 851 | 7.17 | 26 | https://doi.org/10.7717/peerj.16230 |
39
+ | Deng2023 | 2023 | MRI | 261 | 224 | 0.87 | 36 | https://doi.org/10.1007/s13246-023-01300-0 |
40
+ | Dong2022 | 2022 | CT | 279 | 851 | 3.06 | 49 | https://doi.org/10.7717/peerj.14127 |
41
+ | Fusco2022 | 2022 | MRI | 54 | 192 | 3.59 | 61 | https://doi.org/10.3390/curroncol29030159 |
42
+ | Granata2021 | 2021 | CT | 88 | 580 | 6.61 | 47 | https://doi.org/10.3390/cancers13163992 |
43
+ | Granata2024 | 2024 | MRI | 51 | 851 | 16.73 | 75 | https://doi.org/10.3390/diagnostics14020152 |
44
+ | HCC-TACE-Seg | 2023 | CT | 84 | 420 | 5.02 | 14 | https://doi.org/10.1038/s41597-023-01928-3 |
45
+ | HNSCC | 2018 | CT | 93 | 105 | 1.15 | 27 | https://doi.org/10.1038/sdata.2018.173 |
46
+ | Head-Neck-PET-CT | 2017 | PET/CT | 91 | 210 | 2.33 | 67 | https://doi.org/10.1038/s41598-017-10371-5 |
47
+ | Head-Neck-Radiomics-HN1 | 2014 | CT | 137 | 105 | 0.78 | 45 | http://doi.org/10.1038/ncomms5006 |
48
+ | Hosny2018A | 2018 | CT | 293 | 984 | 3.37 | 54 | https://doi.org/10.1371/journal.pmed.1002711 |
49
+ | Hosny2018B | 2018 | CT | 207 | 984 | 4.76 | 29 | https://doi.org/10.1371/journal.pmed.1002711 |
50
+ | Hosny2018C | 2018 | CT | 183 | 984 | 5.39 | 73 | https://doi.org/10.1371/journal.pmed.1002711 |
51
+ | Huang2023 | 2023 | CT | 212 | 855 | 4.04 | 46 | https://doi.org/10.1371/journal.pone.0292110 |
52
+ | Hunter2023 | 2023 | CT | 520 | 1998 | 3.85 | 54 | https://doi.org/10.1038/s41416-023-02480-y |
53
+ | ISPY1 | 2016 | MRI | 161 | 370 | 2.31 | 57 | http://doi.org/10.7937/K9/TCIA.2016.HdHpgJLK |
54
+ | Keek2020 | 2020 | CT | 273 | 1322 | 4.85 | 44 | https://doi.org/10.1371/journal.pone.0232639 |
55
+ | LGG-1p19qDeletion | 2017 | MRI | 159 | 2030 | 12.78 | 64 | https://doi.org/10.1007/s10278-017-9984-3 |
56
+ | LNDb | 2019 | CT | 173 | 105 | 0.62 | 66 | https://doi.org/10.48550/arXiv.1911.08434 |
57
+ | Li2020 | 2020 | MRI | 51 | 396 | 7.8 | 63 | https://doi.org/10.1371/journal.pone.0227703 |
58
+ | Lu2019 | 2019 | CT | 75 | 657 | 8.79 | 73 | https://doi.org/10.1038/s41467-019-08718-9 |
59
+ | Meningioma-SEG-CLASS | 2022 | MRI | 88 | 2030 | 23.09 | 43 | https://doi.org/10.1038/s41598-022-07859-0 |
60
+ | NSCLC-Radiogenomics | 2012 | PET/CT | 144 | 105 | 0.74 | 16 | http://doi.org/10.1148/radiol.12111607 |
61
+ | OcanaTienda2023 | 2023 | MRI | 67 | 1130 | 16.9 | 48 | https://doi.org/10.1038/s41597-023-02123-0 |
62
+ | PI-CAI | 2021 | MRI | 969 | 3045 | 3.14 | 66 | https://doi.org/10.1016/j.media.2021.102155 |
63
+ | Petrillo2023 | 2023 | MRI | 128 | 851 | 6.66 | 37 | https://doi.org/10.1007/s11547-023-01718-2 |
64
+ | Prostate-MRI-US-Biopsy | 2013 | MRI | 773 | 1015 | 1.32 | 77 | https://doi.org/10.1016/j.juro.2012.08.095 |
65
+ | QIN-HEADNECK | 2016 | PET/CT | 59 | 210 | 3.59 | 75 | https://doi.org/10.7717/peerj.2057 |
66
+ | Ramella2018 | 2018 | CT | 91 | 242 | 2.68 | 55 | https://doi.org/10.1371/journal.pone.0207455 |
67
+ | Sasaki2019 | 2019 | MRI | 138 | 587 | 4.27 | 49 | https://doi.org/10.1038/s41598-019-50849-y |
68
+ | Song2020 | 2020 | MRI | 260 | 264 | 1.02 | 49 | https://doi.org/10.1371/journal.pone.0237587 |
69
+ | UCSF-PDGM | 2022 | MRI | 418 | 7105 | 17 | 89 | https://doi.org/10.1148/ryai.220058 |
70
+ | UPENN-GBM | 2022 | MRI | 187 | 11165 | 59.72 | 42 | https://doi.org/10.1038/s41597-022-01560-7 |
71
+ | Veeraraghavan2020 | 2020 | MRI | 150 | 200 | 1.35 | 31 | https://doi.org/10.1038/s41598-020-72475-9 |
72
+ | WORC-CRLM | 2021 | CT | 77 | 1015 | 13.21 | 48 | https://doi.org/10.48550/arXiv.2108.08618 |
73
+ | WORC-Desmoid | 2021 | MRI | 203 | 1015 | 5.01 | 35 | https://doi.org/10.48550/arXiv.2108.08618 |
74
+ | WORC-GIST | 2021 | CT | 245 | 1015 | 4.15 | 51 | https://doi.org/10.48550/arXiv.2108.08618 |
75
+ | WORC-Lipo | 2021 | MRI | 114 | 1015 | 8.92 | 50 | https://doi.org/10.48550/arXiv.2108.08618 |
76
+ | WORC-Liver | 2021 | MRI | 186 | 1015 | 5.47 | 51 | https://doi.org/10.48550/arXiv.2108.08618 |
77
+ | WORC-Melanoma | 2021 | CT | 95 | 1015 | 10.71 | 49 | https://doi.org/10.48550/arXiv.2108.08618 |
78
+ | Wang2024 | 2024 | MRI | 67 | 280 | 4.21 | 40 | https://doi.org/10.1371/journal.pone.0299267 |
79
+ | Zhang2023 | 2023 | CT | 203 | 1781 | 8.78 | 51 | https://doi.org/10.7717/peerj.14559 |
80
+ | Zhang2024A | 2024 | PET/CT | 255 | 3850 | 15.11 | 57 | https://doi.org/10.1371/journal.pone.0300170 |
81
+ | Zhang2024B | 2024 | CT | 192 | 833 | 4.35 | 66 | https://doi.org/10.7717/peerj.17111 |
82
+ <!-- dataset table:end -->
83
+
84
+
85
+ ## Python wrapper
86
+
87
+ For easy access to the benchmark data sets, we have provided a Python wrapper named `radMLBench`. The wrapper can be installed on Python via `pip`:
88
+
89
+ ```
90
+ pip install radMLBench
91
+ ```
92
+
93
+ and used in Python scripts as follows:
94
+
95
+ ```python
96
+ from radMLBench import listDatasets, getMetaData, loadData
97
+
98
+ for dataset in radMLBench.listDatasets():
99
+ print (f"Loading {dataset}")
100
+ data = radMLBench.loadData(dataset)
101
+ print (data.shape)
102
+ ```
103
+
104
+ There is a simple example on how to use it in combination with a random forest
105
+ classifier in `./examples/simpleTest.py`.
106
+
107
+ Ideally, one should download the data to a local directory so that
108
+ downloading from the internet is minimized for speed reaons. To do so,
109
+ just use the `local_cache_dir` variable:
110
+
111
+ ``` data = radMLBench.loadData("Wang2024", local_cache_dir="~/radMLBench.repo") ```
112
+
113
+ In case you want to load the data not as a dataframe (where ID and Target columns
114
+ exist), but as a ready-to-use numpy dataset, just add the parameter `return_X_y`.
115
+ This will convert the pandas dataframe into two numpy arrays X, and y. X will
116
+ contain the data and y the labels.
117
+
118
+ ``` data = radMLBench.loadData("Wang2024", local_cache_dir="~/radMLBench.repo", return_X_y = True) ```
119
+
120
+
121
+
122
+ ## Experiments
123
+
124
+ The decorrelation example can be found in `examples/decorrelation`,
125
+ to execute it, start `./examples/decorrelation/decorrelation.py`.
126
+
127
+ The other example, TabFPN, can be found in `examples/tebpfn`.
128
+ However, before executing this, one must install TabFPN (which in turn
129
+ will install things like torch). One must also execute TabFPN once
130
+ before executing the script, since TabFPN must first download the model--
131
+ but this will not work if multiple TabFPN instances try it at the same time.
132
+ Therefore, one must first (with a single CPU core) execute TabFPN.
133
+ One can achieve this by setting downloadFirst to True in the script.
134
+ After executing the script (which will just download and exit), one can
135
+ put downloadFirst to False again to execute the experiment.
136
+
137
+
138
+
139
+
140
+ ## Citing radMLBench
141
+
142
+ If you use radMLBench in a scientific publication, please consider citing the paper:
143
+
144
+ Aydin Demircioglu.
145
+ [radMLBench: A radiomics dataset collection for benchmarking in radiomics](TBD).
146
+ _TBD_ (2024).
147
+
148
+ (This will update as soon as the manuscript is submitted).
149
+
150
+ ```
@@ -0,0 +1,32 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+ """
4
+ RadMLBench was developed at the University Hospital in Essen, Germany.
5
+ For questions use github issues or write an email (aydin.demircioglu@uk-essen.de).
6
+
7
+ RadMLBench is partially based on the PMLB (Penn Machine Learning Benchmarks), see https://epistasislab.github.io/pmlb/
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software
10
+ and associated documentation files (the "Software"), to deal in the Software without restriction,
11
+ including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
12
+ and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
13
+ subject to the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be included in all copies or substantial
16
+ portions of the Software.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
19
+ LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
21
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
+ """
24
+
25
+ from .radMLBench import (
26
+ listDatasets,
27
+ loadData,
28
+ getCVSplits,
29
+ getMetaData)
30
+
31
+
32
+ #