Near-infrared spectra, SSC and colour measurements of paper-bagged Venus Golden apples with reproducible maturity classification code
Description
This dataset contains matched near-infrared spectra and reference measurements from 130 ‘Venus Golden’ apples for investigating SSC-defined maturity classification through intact double-layer paper bags. The dataset includes 390 original fruit spectra: through-bag equatorial spectra, through-bag bottom spectra, and equatorial spectra acquired after bag removal, with one spectrum per apple per condition. Three additional empty-bag reference spectra represent the complete double-layer bag, outer paper and inner paper, with one measurement per configuration. Each spectrum contains 1,557 channels on the native wavenumber grid, covering approximately 1000–2500 nm. Reference measurements include two soluble solids content (SSC) readings per apple and CIE L*a*b* values at the equator and bottom. Binary maturity labels were defined using mean SSC: mature ≥15 °Brix and immature <15 °Brix. The dataset contains 41 mature and 89 immature apples. Through-bag spectra were acquired during 29–31 October 2026; after-removal spectra and reference SSC measurements were obtained on 31 October. Paired measurements can therefore differ by up to two calendar days. Original OMNIC SPA files and open CSV exports are provided together with Python analysis code, shared cross-validation folds, selected model settings, 6,500 outer out-of-fold probabilities, statistical results and figure source data. The code supports nested cross-validation, spectral–colour feature fusion, paired apple-level bootstrap intervals, empty-bag spectral comparisons and exploratory channel-wise association analyses. The README, data dictionary and validation report describe file contents, units, preprocessing and reproduction procedures. All 130 apples are retained. Empty-bag references are single measurements, and spectral comparisons should not be interpreted as estimates of physical fruit/paper signal fractions.
Files
Steps to reproduce
1. Extract the uploaded ZIP archive and open a terminal in the extracted root directory containing README.md, requirements.txt, data/, code/ and results/. 2. Create a Python 3.8 environment and install the required dependencies: python -m pip install -r requirements.txt An environment.yml file is also provided for Conda users. 3. Verify the original SPA files and regenerate the numerical data tables: python code/export_and_verify.py --output reproduced/raw_export 4. Recompute classification metrics and paired percentile 95% confidence intervals from the retained outer out-of-fold probabilities: python code/summarize.py --output reproduced/metrics 5. Recompute empty-bag spectral comparisons, local peak descriptors, same-apple pairing controls and shared-permutation channel associations: python code/spectral_analysis.py --output reproduced/spectral 6. Refit all 250 stored selected pipelines on their original outer training folds: python code/models.py --mode refit-selected --output reproduced/refit This command uses the retained model selections. To repeat the complete nested model-selection procedure instead: python code/models.py --mode nested --output reproduced/full_nested The complete nested search is substantially slower. 7. Generate descriptive reference-measurement summaries and overview plots: python code/descriptive_statistics.py --output reproduced/descriptive python code/plot_overview.py --output reproduced/plots Each output directory must be new. The scripts preserve the distributed inputs and reference results. Packaging validation verified all 393 spectra, refitted all 250 selected pipelines, and independently repeated inner model selection for one outer fold in each of the ten conditions. The complete nested search was not rerun during packaging. Detailed checks and numerical tolerances are reported in documentation/VALIDATION_REPORT.md.
Institutions
- Qingdao Agricultural UniversityShandong, Qingdao