Code and results for: Conformal Coverage Collapse under NIR Instrument Transfer and the Price of Restoring It with Labelled Target Samples
Description
Code and results accompanying the article "Conformal Coverage Collapse under NIR Instrument Transfer and the Price of Restoring It with Labelled Target Samples" by Mazhar Kayaoğlu and Bahaddin Erdem (submitted to Applied Sciences, MDPI).
The study measures whether split-conformal prediction intervals keep their nominal coverage when a quantitative near-infrared (NIR) calibration is moved to another instrument, on four paired transfer axes (corn, pharmaceutical tablets, cross-manufacturer wheat and handheld soil units), and what it costs to restore validity with labelled target samples or with standardisation. Five point models are compared throughout: partial least squares (PLS), a 1D convolutional network (CNN1D), a bidirectional selective state-space model (BiSSM), a PLS-residual network (PLS-ResNet) and a guarded non-negative stack of PLS, CNN1D and PLS-ResNet (Stack).
The deposit contains the complete analysis pipeline, from the raw public datasets to every result table and figure; the result tables (CSV) and figures of the run reported in the article, including the analyses added in revision (reports/revision_01/); a consistency check that regenerates every results table from the stored results and compares it with the results documents; verification scripts that recompute the reported numbers from the stored results or, for a few, from the raw data; and the unit tests of the core components.
The five datasets are public and are not redistributed here; scripts/00_download.py downloads them. The stored results can be checked in minutes without the data (python scripts/71_tables.py --check). The reported run used Python 3.13 on Google Colab (NVIDIA A100 GPUs), and the code is released under the MIT licence. README.md describes the installation, the data and the reproduction of the results.
Files
nir_conformal_transfer_code_v1.0.0.zip
Additional details
Related works
- References
- Dataset: 10.5281/zenodo.13122321 (DOI)
- Dataset: https://www.eigenvector.com/data/Corn/index.html (URL)
- Dataset: https://eigenvector.com/data/ (URL)
- Dataset: http://lib.stat.cmu.edu/datasets/tecator (URL)
- Dataset: https://www.cnirs.org/content.aspx?page_id=22&club_id=409746&module_id=239453 (URL)
Software
- Programming language
- Python
References
- Hopkins, D. W. (2003). Shoot-out 2002: transfer of calibration for content of active in a pharmaceutical tablet. NIR news 14(5), 10-13. https://doi.org/10.1255/nirn.735
- Eigenvector Research Inc. NIR of corn samples for standardization benchmarking [dataset]. https://www.eigenvector.com/data/Corn/index.html
- Borggaard, C. & Thodberg, H. H. (1992). Optimal minimal neural interpretation of spectra. Analytical Chemistry 64(5), 545-551. https://doi.org/10.1021/ac00029a018
- Sanderman, J., Partida, C., Safanelli, J. L., Mitu, S. M., Ge, Y., Murad, O. & Shepherd, K. (2024). Near-infrared (NIR) soil spectral library using the NeoSpectra handheld NIR analyzer by Si-Ware, version 1.2 [dataset]. Zenodo. https://doi.org/10.5281/zenodo.13122321
- Council for Near-Infrared Spectroscopy. IDRC 2016 Shootout (traditional) [dataset; wheat data from three NIR instrument manufacturers]. https://www.cnirs.org/content.aspx?page_id=22&club_id=409746&module_id=239453