raman-bench 0.1.0a1__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.
- raman_bench-0.1.0a1/LICENSE +21 -0
- raman_bench-0.1.0a1/PKG-INFO +363 -0
- raman_bench-0.1.0a1/README.md +268 -0
- raman_bench-0.1.0a1/pyproject.toml +144 -0
- raman_bench-0.1.0a1/setup.cfg +4 -0
- raman_bench-0.1.0a1/src/raman_bench/__init__.py +76 -0
- raman_bench-0.1.0a1/src/raman_bench/benchmark.py +445 -0
- raman_bench-0.1.0a1/src/raman_bench/cli.py +171 -0
- raman_bench-0.1.0a1/src/raman_bench/config.py +113 -0
- raman_bench-0.1.0a1/src/raman_bench/custom_models/__init__.py +12 -0
- raman_bench-0.1.0a1/src/raman_bench/custom_models/base.py +1 -0
- raman_bench-0.1.0a1/src/raman_bench/custom_models/coatnet.py +1 -0
- raman_bench-0.1.0a1/src/raman_bench/custom_models/deepcnn.py +1 -0
- raman_bench-0.1.0a1/src/raman_bench/custom_models/fcresnext.py +1 -0
- raman_bench-0.1.0a1/src/raman_bench/custom_models/pls.py +1 -0
- raman_bench-0.1.0a1/src/raman_bench/custom_models/ramanformer.py +1 -0
- raman_bench-0.1.0a1/src/raman_bench/custom_models/ramannet.py +1 -0
- raman_bench-0.1.0a1/src/raman_bench/custom_models/ramantransformer.py +1 -0
- raman_bench-0.1.0a1/src/raman_bench/custom_models/rezeronet.py +1 -0
- raman_bench-0.1.0a1/src/raman_bench/custom_models/sanet.py +1 -0
- raman_bench-0.1.0a1/src/raman_bench/custom_models/sktime_models.py +1 -0
- raman_bench-0.1.0a1/src/raman_bench/data/__init__.py +0 -0
- raman_bench-0.1.0a1/src/raman_bench/data/precomputed/__init__.py +0 -0
- raman_bench-0.1.0a1/src/raman_bench/data/precomputed/dataset_stats.json +3829 -0
- raman_bench-0.1.0a1/src/raman_bench/data/precomputed/datasets.csv +78 -0
- raman_bench-0.1.0a1/src/raman_bench/data/precomputed/leaderboard_clf.csv +29 -0
- raman_bench-0.1.0a1/src/raman_bench/data/precomputed/leaderboard_overall.csv +29 -0
- raman_bench-0.1.0a1/src/raman_bench/data/precomputed/leaderboard_reg.csv +27 -0
- raman_bench-0.1.0a1/src/raman_bench/evaluation.py +253 -0
- raman_bench-0.1.0a1/src/raman_bench/leaderboard.py +439 -0
- raman_bench-0.1.0a1/src/raman_bench/logging_utils.py +35 -0
- raman_bench-0.1.0a1/src/raman_bench/metrics/__init__.py +11 -0
- raman_bench-0.1.0a1/src/raman_bench/metrics/classification.py +101 -0
- raman_bench-0.1.0a1/src/raman_bench/metrics/regression.py +65 -0
- raman_bench-0.1.0a1/src/raman_bench/metrics/utils.py +82 -0
- raman_bench-0.1.0a1/src/raman_bench/model.py +328 -0
- raman_bench-0.1.0a1/src/raman_bench/models/__init__.py +27 -0
- raman_bench-0.1.0a1/src/raman_bench/models/custom/__init__.py +53 -0
- raman_bench-0.1.0a1/src/raman_bench/models/custom/base.py +379 -0
- raman_bench-0.1.0a1/src/raman_bench/models/custom/coatnet.py +293 -0
- raman_bench-0.1.0a1/src/raman_bench/models/custom/deepcnn.py +166 -0
- raman_bench-0.1.0a1/src/raman_bench/models/custom/fcresnext.py +212 -0
- raman_bench-0.1.0a1/src/raman_bench/models/custom/pls.py +357 -0
- raman_bench-0.1.0a1/src/raman_bench/models/custom/ramanformer.py +248 -0
- raman_bench-0.1.0a1/src/raman_bench/models/custom/ramannet.py +196 -0
- raman_bench-0.1.0a1/src/raman_bench/models/custom/ramantransformer.py +232 -0
- raman_bench-0.1.0a1/src/raman_bench/models/custom/rezeronet.py +258 -0
- raman_bench-0.1.0a1/src/raman_bench/models/custom/sanet.py +281 -0
- raman_bench-0.1.0a1/src/raman_bench/models/custom/sktime_models.py +161 -0
- raman_bench-0.1.0a1/src/raman_bench/predictions.py +559 -0
- raman_bench-0.1.0a1/src/raman_bench/preprocessing/__init__.py +46 -0
- raman_bench-0.1.0a1/src/raman_bench/preprocessing/mixin.py +435 -0
- raman_bench-0.1.0a1/src/raman_bench/preprocessing/raman_preprocessing.py +460 -0
- raman_bench-0.1.0a1/src/raman_bench/preprocessing/wrapped_models.py +283 -0
- raman_bench-0.1.0a1/src/raman_bench/seeds.py +25 -0
- raman_bench-0.1.0a1/src/raman_bench.egg-info/PKG-INFO +363 -0
- raman_bench-0.1.0a1/src/raman_bench.egg-info/SOURCES.txt +63 -0
- raman_bench-0.1.0a1/src/raman_bench.egg-info/dependency_links.txt +1 -0
- raman_bench-0.1.0a1/src/raman_bench.egg-info/entry_points.txt +2 -0
- raman_bench-0.1.0a1/src/raman_bench.egg-info/requires.txt +48 -0
- raman_bench-0.1.0a1/src/raman_bench.egg-info/top_level.txt +1 -0
- raman_bench-0.1.0a1/tests/test_config.py +55 -0
- raman_bench-0.1.0a1/tests/test_leaderboard.py +70 -0
- raman_bench-0.1.0a1/tests/test_metrics.py +73 -0
- raman_bench-0.1.0a1/tests/test_preprocessing.py +59 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 KI-Werkstatt
|
|
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,363 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: raman-bench
|
|
3
|
+
Version: 0.1.0a1
|
|
4
|
+
Summary: A large-scale benchmark for machine learning on Raman spectroscopy data
|
|
5
|
+
Author-email: Mario Koddenbrock <mario.koddenbrock@htw-berlin.de>, Christoph Lange <christoph.lange@tu-berlin.de>
|
|
6
|
+
Maintainer-email: Mario Koddenbrock <mario.koddenbrock@htw-berlin.de>
|
|
7
|
+
License: MIT License
|
|
8
|
+
|
|
9
|
+
Copyright (c) 2026 KI-Werkstatt
|
|
10
|
+
|
|
11
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
13
|
+
in the Software without restriction, including without limitation the rights
|
|
14
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
16
|
+
furnished to do so, subject to the following conditions:
|
|
17
|
+
|
|
18
|
+
The above copyright notice and this permission notice shall be included in all
|
|
19
|
+
copies or substantial portions of the Software.
|
|
20
|
+
|
|
21
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
27
|
+
SOFTWARE.
|
|
28
|
+
|
|
29
|
+
Project-URL: Homepage, https://github.com/ml-lab-htw/RamanBench
|
|
30
|
+
Project-URL: Documentation, https://ramanbench.readthedocs.io
|
|
31
|
+
Project-URL: Repository, https://github.com/ml-lab-htw/RamanBench
|
|
32
|
+
Project-URL: Bug Tracker, https://github.com/ml-lab-htw/RamanBench/issues
|
|
33
|
+
Project-URL: Leaderboard, https://huggingface.co/spaces/ml-lab-htw/RamanBench
|
|
34
|
+
Project-URL: raman-data, https://github.com/ml-lab-htw/raman_data
|
|
35
|
+
Project-URL: Paper, https://arxiv.org/abs/TBD
|
|
36
|
+
Keywords: raman,spectroscopy,benchmark,machine-learning,deep-learning,autogluon,tabular,chemistry,biology,material-science
|
|
37
|
+
Classifier: Development Status :: 3 - Alpha
|
|
38
|
+
Classifier: Intended Audience :: Science/Research
|
|
39
|
+
Classifier: Intended Audience :: Developers
|
|
40
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
41
|
+
Classifier: Operating System :: OS Independent
|
|
42
|
+
Classifier: Programming Language :: Python :: 3
|
|
43
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
44
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
45
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
46
|
+
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
|
47
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
48
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
49
|
+
Requires-Python: >=3.11
|
|
50
|
+
Description-Content-Type: text/markdown
|
|
51
|
+
License-File: LICENSE
|
|
52
|
+
Requires-Dist: numpy<2.0,>=1.21
|
|
53
|
+
Requires-Dist: pandas<3.0,>=1.4
|
|
54
|
+
Requires-Dist: scikit-learn<2.0,>=1.0
|
|
55
|
+
Requires-Dist: matplotlib<4.0,>=3.5
|
|
56
|
+
Requires-Dist: seaborn>=0.12
|
|
57
|
+
Requires-Dist: tqdm<5.0,>=4.64
|
|
58
|
+
Requires-Dist: raman-data>=1.0.0
|
|
59
|
+
Provides-Extra: autogluon
|
|
60
|
+
Requires-Dist: autogluon.common>=1.5; extra == "autogluon"
|
|
61
|
+
Requires-Dist: autogluon.core>=1.5; extra == "autogluon"
|
|
62
|
+
Requires-Dist: autogluon.features>=1.5; extra == "autogluon"
|
|
63
|
+
Requires-Dist: autogluon.tabular>=1.5; extra == "autogluon"
|
|
64
|
+
Provides-Extra: deep
|
|
65
|
+
Requires-Dist: torch<3.0,>=2.0; extra == "deep"
|
|
66
|
+
Requires-Dist: ramanspy<0.3.0,>=0.2.10; extra == "deep"
|
|
67
|
+
Requires-Dist: imodels>=2.0.4; extra == "deep"
|
|
68
|
+
Requires-Dist: tabpfn>=6.3.2; extra == "deep"
|
|
69
|
+
Requires-Dist: pytabkit>=1.7.3; extra == "deep"
|
|
70
|
+
Requires-Dist: tabdpt>=1.1.12; extra == "deep"
|
|
71
|
+
Requires-Dist: sktime>=0.40.0; extra == "deep"
|
|
72
|
+
Requires-Dist: numba>=0.63.0; extra == "deep"
|
|
73
|
+
Provides-Extra: full
|
|
74
|
+
Requires-Dist: raman-bench[autogluon]; extra == "full"
|
|
75
|
+
Requires-Dist: raman-bench[deep]; extra == "full"
|
|
76
|
+
Requires-Dist: adjustText>=1.2.0; extra == "full"
|
|
77
|
+
Requires-Dist: pynvml>=11.0; extra == "full"
|
|
78
|
+
Provides-Extra: dev
|
|
79
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
80
|
+
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
81
|
+
Requires-Dist: black>=23.0; extra == "dev"
|
|
82
|
+
Requires-Dist: isort>=5.12; extra == "dev"
|
|
83
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
84
|
+
Requires-Dist: pre-commit>=3.0; extra == "dev"
|
|
85
|
+
Provides-Extra: docs
|
|
86
|
+
Requires-Dist: sphinx>=7.0; extra == "docs"
|
|
87
|
+
Requires-Dist: sphinx-rtd-theme>=2.0; extra == "docs"
|
|
88
|
+
Requires-Dist: myst-parser>=2.0; extra == "docs"
|
|
89
|
+
Requires-Dist: nbsphinx>=0.9; extra == "docs"
|
|
90
|
+
Requires-Dist: sphinx-autodoc-typehints>=1.25; extra == "docs"
|
|
91
|
+
Provides-Extra: notebooks
|
|
92
|
+
Requires-Dist: jupyter>=1.0; extra == "notebooks"
|
|
93
|
+
Requires-Dist: ipykernel>=6.0; extra == "notebooks"
|
|
94
|
+
Dynamic: license-file
|
|
95
|
+
|
|
96
|
+
# RamanBench
|
|
97
|
+
|
|
98
|
+
[](https://pypi.org/project/raman-bench/)
|
|
99
|
+
[](https://www.python.org)
|
|
100
|
+
[](https://github.com/ml-lab-htw/RamanBench/actions/workflows/ci.yml)
|
|
101
|
+
[](LICENSE)
|
|
102
|
+
[](https://arxiv.org/abs/TBD)
|
|
103
|
+
[](https://huggingface.co/spaces/ml-lab-htw/RamanBench)
|
|
104
|
+
|
|
105
|
+
**A large-scale benchmark for machine learning on Raman spectroscopy data.**
|
|
106
|
+
|
|
107
|
+
> 74 datasets · 163 prediction targets · 28 baseline models · 4 application domains
|
|
108
|
+
|
|
109
|
+
RamanBench provides a reproducible evaluation protocol and a curated collection
|
|
110
|
+
of public Raman spectroscopy datasets spanning Material Science, Biological,
|
|
111
|
+
Medical, and Chemical applications. Researchers can rank new models against
|
|
112
|
+
28 pre-evaluated baselines — from classical PLS to tabular foundation models
|
|
113
|
+
and Raman-specific deep learning architectures — without re-running all experiments.
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Ecosystem
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
raman-data ──▶ raman-bench ──▶ Live Leaderboard
|
|
121
|
+
(datasets) (this package) HuggingFace Space
|
|
122
|
+
PyPI / GitHub PyPI / GitHub
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
| Resource | Link |
|
|
126
|
+
|---------------------------------|----------------------------------------------------------------------------------------------------|
|
|
127
|
+
| **raman-data** (dataset loader) | [GitHub](https://github.com/ml-lab-htw/raman_data) · [PyPI](https://pypi.org/project/raman-data/) |
|
|
128
|
+
| **raman-bench** (this package) | [GitHub](https://github.com/ml-lab-htw/RamanBench) · [PyPI](https://pypi.org/project/raman-bench/) |
|
|
129
|
+
| **Live Leaderboard** | [huggingface.co/spaces/ml-lab-htw/RamanBench](https://huggingface.co/spaces/ml-lab-htw/RamanBench) |
|
|
130
|
+
| **Paper** | [arXiv TBD](https://arxiv.org/abs/TBD) |
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Quick Start
|
|
135
|
+
|
|
136
|
+
### Installation
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
# Core package (leaderboard + dataset loading, no heavy dependencies)
|
|
140
|
+
pip install raman-bench
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**For running the full benchmark** (AutoGluon + deep learning models), RamanBench
|
|
144
|
+
requires a patched AutoGluon fork. The official AutoGluon release caps tabular
|
|
145
|
+
foundation models (TabPFN v2, TabICL, TabDPT, MITRA, …) at 500 features and
|
|
146
|
+
silently skips them on larger datasets; Raman spectra typically have 500–4000
|
|
147
|
+
wavenumber points. The fork removes this cap. Install it first:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
git clone https://github.com/ml-lab-htw/RamanBench.git
|
|
151
|
+
cd RamanBench
|
|
152
|
+
pip install -r requirements-autogluon-fork.txt
|
|
153
|
+
pip install "raman-bench[deep]"
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Explore the precomputed leaderboard
|
|
157
|
+
|
|
158
|
+
```python
|
|
159
|
+
from raman_bench import Leaderboard
|
|
160
|
+
|
|
161
|
+
# Load v0.1 results: 28 models × 74 datasets
|
|
162
|
+
lb = Leaderboard.from_precomputed()
|
|
163
|
+
print(lb.rank()) # ranked DataFrame
|
|
164
|
+
lb.plot() # horizontal bar chart
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Evaluate a new model
|
|
168
|
+
|
|
169
|
+
```python
|
|
170
|
+
from raman_bench import Leaderboard
|
|
171
|
+
from sklearn.cross_decomposition import PLSRegression
|
|
172
|
+
|
|
173
|
+
lb = Leaderboard.from_precomputed()
|
|
174
|
+
|
|
175
|
+
# Evaluates your model on all 74 datasets (3 seeds) and adds it to the ranking
|
|
176
|
+
results = lb.evaluate_and_add(
|
|
177
|
+
model_name="My-PLS-10",
|
|
178
|
+
model=PLSRegression(n_components=10),
|
|
179
|
+
)
|
|
180
|
+
print(lb.rank())
|
|
181
|
+
lb.plot()
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### Run the full benchmark pipeline
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
# 1. Clone, install the AutoGluon fork, then install in development mode
|
|
188
|
+
git clone https://github.com/ml-lab-htw/RamanBench.git
|
|
189
|
+
cd RamanBench
|
|
190
|
+
pip install -r requirements-autogluon-fork.txt
|
|
191
|
+
pip install -e ".[deep]"
|
|
192
|
+
|
|
193
|
+
# 2. Pre-cache all dataset splits (optional, speeds up the run)
|
|
194
|
+
python scripts/prepare_datasets.py --config configs/benchmark_v0.1.json
|
|
195
|
+
|
|
196
|
+
# 3. Run predictions → metrics
|
|
197
|
+
raman-bench run --config configs/benchmark_v0.1.json
|
|
198
|
+
|
|
199
|
+
# 4. Run a single step
|
|
200
|
+
raman-bench run --config configs/benchmark_v0.1.json --step predictions
|
|
201
|
+
raman-bench run --config configs/benchmark_v0.1.json --step metrics
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### Notebooks
|
|
205
|
+
|
|
206
|
+
| Notebook | Description |
|
|
207
|
+
|---|---|
|
|
208
|
+
| [`01_quick_start.ipynb`](notebooks/01_quick_start.ipynb) | Load a dataset, explore the precomputed leaderboard, plot rankings |
|
|
209
|
+
| [`02_benchmark_new_model.ipynb`](notebooks/02_benchmark_new_model.ipynb) | Evaluate your own model and add it to the leaderboard |
|
|
210
|
+
| [`03_explore_results.ipynb`](notebooks/03_explore_results.ipynb) | Deep dive into per-dataset and per-domain results |
|
|
211
|
+
| [`04_contribute_dataset.ipynb`](notebooks/04_contribute_dataset.ipynb) | Step-by-step guide to contributing a new dataset |
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## Benchmark Composition
|
|
216
|
+
|
|
217
|
+
### Datasets
|
|
218
|
+
|
|
219
|
+
74 public Raman spectroscopy datasets from four application domains:
|
|
220
|
+
|
|
221
|
+
| Domain | Datasets | Task | Sources |
|
|
222
|
+
|---|---|---|---|
|
|
223
|
+
| Chemical | 37 | Regression | Zenodo, HuggingFace |
|
|
224
|
+
| Medical | 11 | Classification | Kaggle, Zenodo |
|
|
225
|
+
| Biological | 8 | Regression | HuggingFace, Zenodo |
|
|
226
|
+
| Material Science | 4 | Classification | RRUFF, Zenodo |
|
|
227
|
+
|
|
228
|
+
All datasets are accessible via `pip install raman-data`:
|
|
229
|
+
|
|
230
|
+
```python
|
|
231
|
+
from raman_data import raman_data
|
|
232
|
+
|
|
233
|
+
dataset = raman_data("amino_acids_glycine")
|
|
234
|
+
X = dataset.spectra # (n_samples, n_wavenumbers)
|
|
235
|
+
y = dataset.targets # regression targets or class labels
|
|
236
|
+
w = dataset.raman_shifts # wavenumber axis in cm⁻¹
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
**Dataset catalog:** [raman-data on GitHub](https://github.com/ml-lab-htw/raman_data)
|
|
240
|
+
|
|
241
|
+
### Models (v0.1 — 28 baselines)
|
|
242
|
+
|
|
243
|
+
**Classical ML / Spectroscopy**
|
|
244
|
+
- PLS (partial least squares)
|
|
245
|
+
- KNN, LR, RF, XT, GBM (LightGBM), XGB (XGBoost), CatBoost
|
|
246
|
+
|
|
247
|
+
**Tabular Deep Learning**
|
|
248
|
+
- NN_TORCH, FastAI, RealMLP
|
|
249
|
+
|
|
250
|
+
**Tabular Foundation Models**
|
|
251
|
+
- TabPFN v2, TabPFN v2.5, MITRA, TabM, TabDPT, TabICL
|
|
252
|
+
|
|
253
|
+
**Time-Series / Spectral Classifiers**
|
|
254
|
+
- ROCKET, ARSENAL
|
|
255
|
+
|
|
256
|
+
**Raman-Specific Neural Networks**
|
|
257
|
+
- DeepCNN (Liu et al., 2017)
|
|
258
|
+
- RamanNet (Ibtehaz et al., 2023)
|
|
259
|
+
- SANet (Deng et al., 2021)
|
|
260
|
+
- RamanFormer (Koyun et al., 2024)
|
|
261
|
+
- RamanTransformer (Liu et al., 2023)
|
|
262
|
+
- ReZeroNet, FC-ResNeXt, CoAtNet (Lange et al., 2025)
|
|
263
|
+
|
|
264
|
+
**AutoGluon ensemble** (AUTOGLUON)
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
## Ranking Protocol
|
|
269
|
+
|
|
270
|
+
Models are evaluated under three complementary metrics:
|
|
271
|
+
|
|
272
|
+
| Metric | Description |
|
|
273
|
+
|---|---|
|
|
274
|
+
| **Elo** | Pairwise win-rate Elo calibrated to RF = 1000 (200-round bootstrap) |
|
|
275
|
+
| **Score** | Normalised per-dataset score: best model = 1, median model = 0 |
|
|
276
|
+
| **Avg Rank** | Average rank across all datasets and targets |
|
|
277
|
+
| **Improvability** | % gap to the best model, averaged across datasets |
|
|
278
|
+
|
|
279
|
+
See the [live leaderboard](https://huggingface.co/spaces/ml-lab-htw/RamanBench) for
|
|
280
|
+
interactive filtering by model category, task type, and dataset domain.
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
|
|
284
|
+
## Repository Structure
|
|
285
|
+
|
|
286
|
+
```
|
|
287
|
+
RamanBench/
|
|
288
|
+
├── src/raman_bench/ # Python package (install via pip)
|
|
289
|
+
│ ├── benchmark.py # Dataset loading and caching
|
|
290
|
+
│ ├── model.py # AutoGluon wrapper
|
|
291
|
+
│ ├── evaluation.py # Metric computation (Step 2)
|
|
292
|
+
│ ├── predictions.py # Prediction generation (Step 1)
|
|
293
|
+
│ ├── leaderboard.py # Leaderboard + model evaluation
|
|
294
|
+
│ ├── config.py # JSON config loader
|
|
295
|
+
│ ├── preprocessing/ # Raman preprocessing pipeline
|
|
296
|
+
│ ├── metrics/ # Classification + regression metrics
|
|
297
|
+
│ └── models/custom/ # 9 Raman-specific architectures
|
|
298
|
+
├── configs/ # Benchmark configuration files
|
|
299
|
+
│ ├── benchmark_v0.1.json
|
|
300
|
+
│ ├── models/ # Model lists (all, raman, traditional, foundation)
|
|
301
|
+
│ └── datasets/ # Dataset lists (regression_all, classification_all)
|
|
302
|
+
├── data/precomputed/ # Bundled v0.1 results (CSVs + dataset_stats.json)
|
|
303
|
+
├── notebooks/ # Example Jupyter notebooks
|
|
304
|
+
├── scripts/ # CLI scripts (run_benchmark.py, prepare_datasets.py)
|
|
305
|
+
├── tests/ # pytest test suite
|
|
306
|
+
└── docs/ # Sphinx documentation
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
## Contributing
|
|
312
|
+
|
|
313
|
+
We welcome contributions of new models and datasets!
|
|
314
|
+
|
|
315
|
+
### Adding a New Model
|
|
316
|
+
|
|
317
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md#adding-a-new-model).
|
|
318
|
+
|
|
319
|
+
Quick summary:
|
|
320
|
+
1. Implement your model as an AutoGluon `AbstractModel` subclass (or use the
|
|
321
|
+
`BaseCustomModel` shared training loop).
|
|
322
|
+
2. Register it in `configs/models/`.
|
|
323
|
+
3. Add tests in `tests/models/`.
|
|
324
|
+
|
|
325
|
+
### Adding a New Dataset
|
|
326
|
+
|
|
327
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md#adding-a-new-dataset) and
|
|
328
|
+
[NEW_DATASETS.md](NEW_DATASETS.md) for detailed instructions and examples.
|
|
329
|
+
|
|
330
|
+
Quick summary:
|
|
331
|
+
1. Upload your dataset to HuggingFace Datasets or Zenodo under CC BY 4.0.
|
|
332
|
+
2. Add a loader to the [raman-data](https://github.com/ml-lab-htw/raman_data) package
|
|
333
|
+
(open a PR there).
|
|
334
|
+
3. Open an issue here linking to the raman-data PR.
|
|
335
|
+
|
|
336
|
+
The [live leaderboard](https://huggingface.co/spaces/ml-lab-htw/RamanBench)
|
|
337
|
+
also has a "How to Contribute" section with step-by-step instructions.
|
|
338
|
+
|
|
339
|
+
---
|
|
340
|
+
|
|
341
|
+
## Citation
|
|
342
|
+
|
|
343
|
+
If you use RamanBench in your research, please cite:
|
|
344
|
+
|
|
345
|
+
```bibtex
|
|
346
|
+
@inproceedings{koddenbrock2026ramanbench,
|
|
347
|
+
title = {RamanBench: A Large-Scale Benchmark for Machine Learning on Raman Spectroscopy Data},
|
|
348
|
+
author = {Koddenbrock, Mario and Lange, Christoph and others},
|
|
349
|
+
booktitle = {Advances in Neural Information Processing Systems (NeurIPS)},
|
|
350
|
+
year = {2026},
|
|
351
|
+
url = {https://arxiv.org/abs/TBD}
|
|
352
|
+
}
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
---
|
|
356
|
+
|
|
357
|
+
## License
|
|
358
|
+
|
|
359
|
+
MIT — see [LICENSE](LICENSE).
|
|
360
|
+
|
|
361
|
+
Dataset licenses vary; see the [dataset catalog](https://huggingface.co/spaces/ml-lab-htw/RamanBench)
|
|
362
|
+
or [raman-data](https://github.com/ml-lab-htw/raman_data) for per-dataset license information.
|
|
363
|
+
Most datasets are released under CC BY 4.0.
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
# RamanBench
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/raman-bench/)
|
|
4
|
+
[](https://www.python.org)
|
|
5
|
+
[](https://github.com/ml-lab-htw/RamanBench/actions/workflows/ci.yml)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
[](https://arxiv.org/abs/TBD)
|
|
8
|
+
[](https://huggingface.co/spaces/ml-lab-htw/RamanBench)
|
|
9
|
+
|
|
10
|
+
**A large-scale benchmark for machine learning on Raman spectroscopy data.**
|
|
11
|
+
|
|
12
|
+
> 74 datasets · 163 prediction targets · 28 baseline models · 4 application domains
|
|
13
|
+
|
|
14
|
+
RamanBench provides a reproducible evaluation protocol and a curated collection
|
|
15
|
+
of public Raman spectroscopy datasets spanning Material Science, Biological,
|
|
16
|
+
Medical, and Chemical applications. Researchers can rank new models against
|
|
17
|
+
28 pre-evaluated baselines — from classical PLS to tabular foundation models
|
|
18
|
+
and Raman-specific deep learning architectures — without re-running all experiments.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Ecosystem
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
raman-data ──▶ raman-bench ──▶ Live Leaderboard
|
|
26
|
+
(datasets) (this package) HuggingFace Space
|
|
27
|
+
PyPI / GitHub PyPI / GitHub
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
| Resource | Link |
|
|
31
|
+
|---------------------------------|----------------------------------------------------------------------------------------------------|
|
|
32
|
+
| **raman-data** (dataset loader) | [GitHub](https://github.com/ml-lab-htw/raman_data) · [PyPI](https://pypi.org/project/raman-data/) |
|
|
33
|
+
| **raman-bench** (this package) | [GitHub](https://github.com/ml-lab-htw/RamanBench) · [PyPI](https://pypi.org/project/raman-bench/) |
|
|
34
|
+
| **Live Leaderboard** | [huggingface.co/spaces/ml-lab-htw/RamanBench](https://huggingface.co/spaces/ml-lab-htw/RamanBench) |
|
|
35
|
+
| **Paper** | [arXiv TBD](https://arxiv.org/abs/TBD) |
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Quick Start
|
|
40
|
+
|
|
41
|
+
### Installation
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# Core package (leaderboard + dataset loading, no heavy dependencies)
|
|
45
|
+
pip install raman-bench
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**For running the full benchmark** (AutoGluon + deep learning models), RamanBench
|
|
49
|
+
requires a patched AutoGluon fork. The official AutoGluon release caps tabular
|
|
50
|
+
foundation models (TabPFN v2, TabICL, TabDPT, MITRA, …) at 500 features and
|
|
51
|
+
silently skips them on larger datasets; Raman spectra typically have 500–4000
|
|
52
|
+
wavenumber points. The fork removes this cap. Install it first:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
git clone https://github.com/ml-lab-htw/RamanBench.git
|
|
56
|
+
cd RamanBench
|
|
57
|
+
pip install -r requirements-autogluon-fork.txt
|
|
58
|
+
pip install "raman-bench[deep]"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Explore the precomputed leaderboard
|
|
62
|
+
|
|
63
|
+
```python
|
|
64
|
+
from raman_bench import Leaderboard
|
|
65
|
+
|
|
66
|
+
# Load v0.1 results: 28 models × 74 datasets
|
|
67
|
+
lb = Leaderboard.from_precomputed()
|
|
68
|
+
print(lb.rank()) # ranked DataFrame
|
|
69
|
+
lb.plot() # horizontal bar chart
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Evaluate a new model
|
|
73
|
+
|
|
74
|
+
```python
|
|
75
|
+
from raman_bench import Leaderboard
|
|
76
|
+
from sklearn.cross_decomposition import PLSRegression
|
|
77
|
+
|
|
78
|
+
lb = Leaderboard.from_precomputed()
|
|
79
|
+
|
|
80
|
+
# Evaluates your model on all 74 datasets (3 seeds) and adds it to the ranking
|
|
81
|
+
results = lb.evaluate_and_add(
|
|
82
|
+
model_name="My-PLS-10",
|
|
83
|
+
model=PLSRegression(n_components=10),
|
|
84
|
+
)
|
|
85
|
+
print(lb.rank())
|
|
86
|
+
lb.plot()
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Run the full benchmark pipeline
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
# 1. Clone, install the AutoGluon fork, then install in development mode
|
|
93
|
+
git clone https://github.com/ml-lab-htw/RamanBench.git
|
|
94
|
+
cd RamanBench
|
|
95
|
+
pip install -r requirements-autogluon-fork.txt
|
|
96
|
+
pip install -e ".[deep]"
|
|
97
|
+
|
|
98
|
+
# 2. Pre-cache all dataset splits (optional, speeds up the run)
|
|
99
|
+
python scripts/prepare_datasets.py --config configs/benchmark_v0.1.json
|
|
100
|
+
|
|
101
|
+
# 3. Run predictions → metrics
|
|
102
|
+
raman-bench run --config configs/benchmark_v0.1.json
|
|
103
|
+
|
|
104
|
+
# 4. Run a single step
|
|
105
|
+
raman-bench run --config configs/benchmark_v0.1.json --step predictions
|
|
106
|
+
raman-bench run --config configs/benchmark_v0.1.json --step metrics
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Notebooks
|
|
110
|
+
|
|
111
|
+
| Notebook | Description |
|
|
112
|
+
|---|---|
|
|
113
|
+
| [`01_quick_start.ipynb`](notebooks/01_quick_start.ipynb) | Load a dataset, explore the precomputed leaderboard, plot rankings |
|
|
114
|
+
| [`02_benchmark_new_model.ipynb`](notebooks/02_benchmark_new_model.ipynb) | Evaluate your own model and add it to the leaderboard |
|
|
115
|
+
| [`03_explore_results.ipynb`](notebooks/03_explore_results.ipynb) | Deep dive into per-dataset and per-domain results |
|
|
116
|
+
| [`04_contribute_dataset.ipynb`](notebooks/04_contribute_dataset.ipynb) | Step-by-step guide to contributing a new dataset |
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Benchmark Composition
|
|
121
|
+
|
|
122
|
+
### Datasets
|
|
123
|
+
|
|
124
|
+
74 public Raman spectroscopy datasets from four application domains:
|
|
125
|
+
|
|
126
|
+
| Domain | Datasets | Task | Sources |
|
|
127
|
+
|---|---|---|---|
|
|
128
|
+
| Chemical | 37 | Regression | Zenodo, HuggingFace |
|
|
129
|
+
| Medical | 11 | Classification | Kaggle, Zenodo |
|
|
130
|
+
| Biological | 8 | Regression | HuggingFace, Zenodo |
|
|
131
|
+
| Material Science | 4 | Classification | RRUFF, Zenodo |
|
|
132
|
+
|
|
133
|
+
All datasets are accessible via `pip install raman-data`:
|
|
134
|
+
|
|
135
|
+
```python
|
|
136
|
+
from raman_data import raman_data
|
|
137
|
+
|
|
138
|
+
dataset = raman_data("amino_acids_glycine")
|
|
139
|
+
X = dataset.spectra # (n_samples, n_wavenumbers)
|
|
140
|
+
y = dataset.targets # regression targets or class labels
|
|
141
|
+
w = dataset.raman_shifts # wavenumber axis in cm⁻¹
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
**Dataset catalog:** [raman-data on GitHub](https://github.com/ml-lab-htw/raman_data)
|
|
145
|
+
|
|
146
|
+
### Models (v0.1 — 28 baselines)
|
|
147
|
+
|
|
148
|
+
**Classical ML / Spectroscopy**
|
|
149
|
+
- PLS (partial least squares)
|
|
150
|
+
- KNN, LR, RF, XT, GBM (LightGBM), XGB (XGBoost), CatBoost
|
|
151
|
+
|
|
152
|
+
**Tabular Deep Learning**
|
|
153
|
+
- NN_TORCH, FastAI, RealMLP
|
|
154
|
+
|
|
155
|
+
**Tabular Foundation Models**
|
|
156
|
+
- TabPFN v2, TabPFN v2.5, MITRA, TabM, TabDPT, TabICL
|
|
157
|
+
|
|
158
|
+
**Time-Series / Spectral Classifiers**
|
|
159
|
+
- ROCKET, ARSENAL
|
|
160
|
+
|
|
161
|
+
**Raman-Specific Neural Networks**
|
|
162
|
+
- DeepCNN (Liu et al., 2017)
|
|
163
|
+
- RamanNet (Ibtehaz et al., 2023)
|
|
164
|
+
- SANet (Deng et al., 2021)
|
|
165
|
+
- RamanFormer (Koyun et al., 2024)
|
|
166
|
+
- RamanTransformer (Liu et al., 2023)
|
|
167
|
+
- ReZeroNet, FC-ResNeXt, CoAtNet (Lange et al., 2025)
|
|
168
|
+
|
|
169
|
+
**AutoGluon ensemble** (AUTOGLUON)
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Ranking Protocol
|
|
174
|
+
|
|
175
|
+
Models are evaluated under three complementary metrics:
|
|
176
|
+
|
|
177
|
+
| Metric | Description |
|
|
178
|
+
|---|---|
|
|
179
|
+
| **Elo** | Pairwise win-rate Elo calibrated to RF = 1000 (200-round bootstrap) |
|
|
180
|
+
| **Score** | Normalised per-dataset score: best model = 1, median model = 0 |
|
|
181
|
+
| **Avg Rank** | Average rank across all datasets and targets |
|
|
182
|
+
| **Improvability** | % gap to the best model, averaged across datasets |
|
|
183
|
+
|
|
184
|
+
See the [live leaderboard](https://huggingface.co/spaces/ml-lab-htw/RamanBench) for
|
|
185
|
+
interactive filtering by model category, task type, and dataset domain.
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## Repository Structure
|
|
190
|
+
|
|
191
|
+
```
|
|
192
|
+
RamanBench/
|
|
193
|
+
├── src/raman_bench/ # Python package (install via pip)
|
|
194
|
+
│ ├── benchmark.py # Dataset loading and caching
|
|
195
|
+
│ ├── model.py # AutoGluon wrapper
|
|
196
|
+
│ ├── evaluation.py # Metric computation (Step 2)
|
|
197
|
+
│ ├── predictions.py # Prediction generation (Step 1)
|
|
198
|
+
│ ├── leaderboard.py # Leaderboard + model evaluation
|
|
199
|
+
│ ├── config.py # JSON config loader
|
|
200
|
+
│ ├── preprocessing/ # Raman preprocessing pipeline
|
|
201
|
+
│ ├── metrics/ # Classification + regression metrics
|
|
202
|
+
│ └── models/custom/ # 9 Raman-specific architectures
|
|
203
|
+
├── configs/ # Benchmark configuration files
|
|
204
|
+
│ ├── benchmark_v0.1.json
|
|
205
|
+
│ ├── models/ # Model lists (all, raman, traditional, foundation)
|
|
206
|
+
│ └── datasets/ # Dataset lists (regression_all, classification_all)
|
|
207
|
+
├── data/precomputed/ # Bundled v0.1 results (CSVs + dataset_stats.json)
|
|
208
|
+
├── notebooks/ # Example Jupyter notebooks
|
|
209
|
+
├── scripts/ # CLI scripts (run_benchmark.py, prepare_datasets.py)
|
|
210
|
+
├── tests/ # pytest test suite
|
|
211
|
+
└── docs/ # Sphinx documentation
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## Contributing
|
|
217
|
+
|
|
218
|
+
We welcome contributions of new models and datasets!
|
|
219
|
+
|
|
220
|
+
### Adding a New Model
|
|
221
|
+
|
|
222
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md#adding-a-new-model).
|
|
223
|
+
|
|
224
|
+
Quick summary:
|
|
225
|
+
1. Implement your model as an AutoGluon `AbstractModel` subclass (or use the
|
|
226
|
+
`BaseCustomModel` shared training loop).
|
|
227
|
+
2. Register it in `configs/models/`.
|
|
228
|
+
3. Add tests in `tests/models/`.
|
|
229
|
+
|
|
230
|
+
### Adding a New Dataset
|
|
231
|
+
|
|
232
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md#adding-a-new-dataset) and
|
|
233
|
+
[NEW_DATASETS.md](NEW_DATASETS.md) for detailed instructions and examples.
|
|
234
|
+
|
|
235
|
+
Quick summary:
|
|
236
|
+
1. Upload your dataset to HuggingFace Datasets or Zenodo under CC BY 4.0.
|
|
237
|
+
2. Add a loader to the [raman-data](https://github.com/ml-lab-htw/raman_data) package
|
|
238
|
+
(open a PR there).
|
|
239
|
+
3. Open an issue here linking to the raman-data PR.
|
|
240
|
+
|
|
241
|
+
The [live leaderboard](https://huggingface.co/spaces/ml-lab-htw/RamanBench)
|
|
242
|
+
also has a "How to Contribute" section with step-by-step instructions.
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## Citation
|
|
247
|
+
|
|
248
|
+
If you use RamanBench in your research, please cite:
|
|
249
|
+
|
|
250
|
+
```bibtex
|
|
251
|
+
@inproceedings{koddenbrock2026ramanbench,
|
|
252
|
+
title = {RamanBench: A Large-Scale Benchmark for Machine Learning on Raman Spectroscopy Data},
|
|
253
|
+
author = {Koddenbrock, Mario and Lange, Christoph and others},
|
|
254
|
+
booktitle = {Advances in Neural Information Processing Systems (NeurIPS)},
|
|
255
|
+
year = {2026},
|
|
256
|
+
url = {https://arxiv.org/abs/TBD}
|
|
257
|
+
}
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
## License
|
|
263
|
+
|
|
264
|
+
MIT — see [LICENSE](LICENSE).
|
|
265
|
+
|
|
266
|
+
Dataset licenses vary; see the [dataset catalog](https://huggingface.co/spaces/ml-lab-htw/RamanBench)
|
|
267
|
+
or [raman-data](https://github.com/ml-lab-htw/raman_data) for per-dataset license information.
|
|
268
|
+
Most datasets are released under CC BY 4.0.
|