specsrbench.build.sets¶
Stage 2 – cut the predictions into the three galaxy-disjoint sets.
Everything downstream reads one of these three, and which one is not a detail:
eval_set.npz572 held-out originals. Every published number.
tune_set.npz40 galaxies from the training side. The classical parameters are chosen on this and nowhere else.
calib_set.npz400 galaxies, also from the training side. Guard 4 – whether a resolvable [O III] pair survives a filter – is measured on these.
The two smaller sets exist because tuning a method on the set you then report it on is the same error, one level up, that the group-wise split fixes at the galaxy level. All three draw from originals only: the paired dataset carries 21 augmented rows per galaxy, and a set built from augmented rows would measure how well a method deconvolves a copy of a spectrum it has already seen.
Guard 4 is measured on calib_set rather than on a synthetic pair on
purpose. A synthetic doublet was tried and discarded: it is far easier to hold
apart than a real one, and it passed settings that merge in real data.
Nothing here is random in the sense of being irreproducible – the draws are seeded and the seeds are part of the definition of the sets.
Module Attributes
Sizes and seeds of the two training-side draws. |
|
Sizes and seeds of the two training-side draws. |
Functions
|
|
|
Cut eval / tune / calib sets from the predictions and the paired dataset. |
|
Row indices of the un-augmented galaxies on the training side. |
|
Per-spectrum z-score, plus the moments needed to undo it. |
- specsrbench.build.sets.TUNE_N = 40¶
Sizes and seeds of the two training-side draws. These are the definition of those sets: changing either changes which galaxies the classical methods were tuned and guarded on, and therefore every classical number downstream.
- specsrbench.build.sets.TUNE_SEED = 0¶
Sizes and seeds of the two training-side draws. These are the definition of those sets: changing either changes which galaxies the classical methods were tuned and guarded on, and therefore every classical number downstream.
- specsrbench.build.sets.training_originals(dataset)[source]¶
Row indices of the un-augmented galaxies on the training side.
- specsrbench.build.sets.build_eval_set(predictions, out)[source]¶
eval_set.npz– the predictions plus the normalised spectra.sigma_pixis deliberately not written. The array of that name in the historicaleval_set.npzwas not produced by anything in either repository and does not describe the data – roughly constant in nanometres where a spectrograph’s LSF is fixed in detector pixels, and up to 2.3x too broad at 5 um. Every classical method used it as its kernel, and with it Wiener, Tikhonov and TV merged line pairs that plain interpolation still resolves. Leaving it out means the kernel can only come fromspecsrbench build lsf, which measures it.