P19-z
A photometric-redshift model trained on PS1 grizy stamps of the P19 sample centred on synthetic transients (synthetic transient positions drawn uniformly in area within three effective radii of the galaxy PS1 r-band Sersic ellipse; the number of positions per galaxy, n = max[1, round((R_e / 8 arcsec)^6)], grows with its size (639,750 positions for 481,589 galaxies, most galaxies with a single one)), so that it can be applied to stamps centred on a new transient. It is the single-task redshift baseline of the multi-task models.
Model
- Backbone: the DELIGHT convolutional backbone (Förster et al. 2022), shared by the five stamp levels.
- Input: PS1 stamps of 30 x 30 pixels at five levels (0.25 arcsec per pixel at level 0, doubling at each level), band(s) g, r, i, z, y.
- Output: the redshift distribution.
Following Pasquet et al. (2019), the redshift is treated as a classification: the head gives the probabilities of 180 equal bins in 0 <= z <= 0.4, and the photometric redshift is the mean of the probability distribution averaged over the eight rotations and flips of the stamp. sigma_NMAD = 1.4826 median(|dz - median(dz)|), with dz = (z_phot - z_spec)/(1 + z_spec); bias is the mean dz and eta the fraction with |dz| > 0.05.
Training data and cross-validation
Trained on PRISM-Astro/h2f_ps1_pasquet_autolabeling_radius_norm_p6 with five-fold cross-validation: there is one model per fold, trained on the other four folds and validated on its own fold. For each fold we keep the checkpoint of the epoch with the lowest validation sigma_NMAD.
Validation results
Validation metrics of each fold model on its own validation fold.
| Fold | Epoch | Step | sigma_NMAD | bias | eta (%) |
|---|---|---|---|---|---|
| 1 | 23 | 91563 | 0.02135 | -0.00208 | 4.35 |
| 2 | 21 | 83979 | 0.02133 | -0.00336 | 4.33 |
| 3 | 29 | 116667 | 0.02144 | -0.00232 | 4.41 |
| 4 | 28 | 112168 | 0.02131 | -0.00202 | 4.40 |
| 5 | 26 | 103610 | 0.02102 | -0.00155 | 4.18 |
| Mean ± std | 0.02129 ± 0.00014 | -0.00226 ± 0.00060 | 4.33 ± 0.08 |
Files
config.yaml Hydra configuration of the run (model, dataset, training arguments)
selection.json checkpoint, epoch, step and validation metrics of each fold
fold_k/model.safetensors
fold_k/trainer_state.json
Usage
Access is gated: request access on this page and log in (huggingface-cli login or HF_TOKEN) before downloading.
from hydra.utils import instantiate
from huggingface_hub import hf_hub_download
from omegaconf import OmegaConf
from safetensors.torch import load_file
repo = "PRISM-Astro/p19-z"
cfg = OmegaConf.load(hf_hub_download(repo, "config.yaml"))
model = instantiate(cfg.model, _convert_="partial") # needs the PRISM package
model.load_state_dict(load_file(hf_hub_download(repo, "fold_1/model.safetensors")))
model.eval()
config.yaml is the Hydra configuration of the run, with dataset.fold_idx: null; the model of fold_k was
trained on the other four folds of the dataset's fold column and validated on fold k. All fold models were trained
with an effective batch of 40 stamps (per-device batch times the number of GPUs, which varied between folds), so the
per-device batch size in the file does not apply to every fold.
The input stamps must be preprocessed as in training (band selection and order, inverse hyperbolic sine of the
g band when it is used, five levels); see prism.dataset and scripts/inferencia_test.py in the code.
- Downloads last month
- -