Photometric-redshift error fitting#
Photometric-redshift uncertainties affect the assignment of galaxies to tomographic bins and therefore the redshift distributions used in cosmological analyses. These uncertainties are commonly described using a statistical model for the relationship between true and observed redshifts.
Binny provides an unbinned maximum-likelihood method for estimating photometric-redshift uncertainty parameters from catalogues containing matched true and observed redshifts.
The method fits a two-component Gaussian mixture to normalized photo-z residuals. The recovered parameters can be converted into Binny’s forward photo-z uncertainty model and used to construct tomographic redshift distributions.
For executable examples, see Photometric-redshift error fitting.
Normalized photometric-redshift residuals#
For a galaxy with true redshift \(z\) and observed photometric redshift \(z_{\mathrm{ph}}\), define the normalized residual
This normalization accounts for the approximate redshift dependence of photometric-redshift scatter, which is often modelled as proportional to \(1+z\).
The observed redshift can equivalently be expressed as
The fitting model assumes that the distribution of normalized residuals is independent of true redshift over the catalogue being fitted.
This provides a compact description of the photo-z error distribution using parameters shared across the sample.
Gaussian-mixture model#
Photometric-redshift errors often contain a dominant population of relatively accurate estimates together with a smaller population of objects exhibiting larger errors or systematic displacements.
Binny models these populations using a two-component Gaussian mixture,
where
The Gaussian probability density is defined as
The parameters describe:
\(\sigma_{\mathrm{core}}\): scatter of the main photo-z population;
\(\sigma_{\mathrm{out}}\): scatter of the outlier population;
\(\mu_{\mathrm{out}}\): mean normalized residual of the outlier population;
\(f_{\mathrm{out}}\): fraction assigned to the outlier component.
The core component has a mean fixed to zero, while the outlier component has an independent mean and scatter.
The mixture weights satisfy
To identify the dominant population as the core, Binny imposes a minimum core weight,
The default value is \(w_{\mathrm{core,min}}=0.5\), restricting the fitted outlier fraction to at most \(0.5\).
This convention reduces ambiguity in component labelling but does not guarantee that the two populations are statistically distinguishable.
Unbinned maximum-likelihood estimation#
Consider a catalogue containing \(N\) matched true and observed redshifts,
The normalized residual for each galaxy is
Assuming independent residuals, the likelihood of the mixture parameters is
The corresponding log-likelihood is
The maximum-likelihood estimator is
subject to the mixture-weight constraint and positive component scatters.
The likelihood is evaluated directly from individual galaxy residuals, without first constructing a histogram.
Consequently, the fitted parameters do not depend on the choice of histogram bin edges.
Expectation-maximization algorithm#
Binny estimates the Gaussian-mixture parameters using the expectation-maximization (EM) algorithm.
The method introduces a latent component label \(c_i\in\{0,1\}\) for each galaxy, with \(c_i=0\) denoting the core and \(c_i=1\) denoting the outlier population.
EM alternates between estimating the probability that each galaxy belongs to the outlier component and updating the mixture parameters.
Expectation step#
The posterior probability that galaxy \(i\) belongs to the outlier component is
The quantity \(r_i\) is called the outlier responsibility.
The corresponding probability of core membership is
These probabilities provide a soft assignment of galaxies to the two mixture components.
Maximization step#
Define the effective component populations as
The unconstrained update for the outlier fraction is
The outlier mean is updated according to
The core variance update is
The core mean remains fixed at zero, so no fitted mean is subtracted in this expression.
The outlier variance update is
The core-weight constraint restricts the updated outlier fraction to
The algorithm repeats the expectation and maximization steps until its convergence criterion is satisfied or the maximum number of iterations is reached.
Gaussian-mixture likelihoods may contain multiple local optima.
Binny therefore supports multiple initializations through n_init.
The seed argument controls the reproducibility of these
initializations.
Connection to the forward photo-z model#
The fitted Gaussian mixture describes normalized residuals, while tomographic binning requires the conditional distribution of observed photometric redshift at fixed true redshift,
The transformation between these quantities follows from
For a Gaussian residual component with mean \(\mu\) and standard deviation \(\sigma\), the corresponding conditional distribution is
The core component has zero residual mean, giving
and
For the outlier component,
which can be rewritten as
Binny provides
binny.calibration.photoz_fitting.to_binny_photoz_params()
to translate the fitted residual parameters into the uncertainty
parameters accepted by the forward photo-z assignment model.
The implemented conversion is
The core mean parameters retain their default values,
The offset sign follows Binny’s forward-model parameter convention. The conversion should be interpreted together with that convention, rather than as a direct identification of the offset parameter with the observed residual mean.
The resulting parameters can be passed to the uncertainties field
of a photometric tomography specification.
Tomographic assignment probabilities#
Let \(n(z)\) denote the parent true-redshift distribution.
A photometric tomographic bin \(i\) is defined by observed-redshift boundaries \([z_i^{\mathrm{min}},z_i^{\mathrm{max}}]\).
The probability that a galaxy at true redshift \(z\) is assigned to this bin is
For a Gaussian component with conditional mean \(m(z)\) and standard deviation \(s(z)\), this integral can be expressed using the standard normal cumulative distribution function \(\Phi\),
For the two-component photo-z mixture, the full assignment probability is
The resulting tomographic true-redshift distribution is
This is the same general window-function construction used throughout Binny’s tomography framework, with
The fitted photo-z uncertainty model therefore determines the probabilistic window functions used to construct the tomographic bins.
Depending on the configuration, each resulting distribution may be normalized independently,
For further discussion of tomographic construction and normalization, see Tomography.
Fit diagnostics#
Binny optionally returns statistical and numerical diagnostics when
return_metadata=True.
The metadata include the log-likelihood, convergence status, number of iterations, information criteria, and a goodness-of-fit statistic.
The Akaike information criterion is
where \(k\) is the number of fitted parameters.
The Bayesian information criterion is
For the four-parameter Gaussian mixture, \(k=4\).
The Kolmogorov–Smirnov statistic compares the empirical cumulative distribution function of the residuals with the fitted mixture,
Here \(F_N\) is the empirical cumulative distribution function, and \(F_{\hat{\boldsymbol{\phi}}}\) is the cumulative distribution function of the fitted mixture.
AIC and BIC are useful for comparing statistical models fitted to the same catalogue. The KS statistic measures distribution-level agreement, although standard KS significance thresholds do not directly apply when the model parameters have been estimated from the same observations.
The convergence information describes the numerical optimization and should be inspected separately from statistical goodness of fit.
Assumptions and limitations#
The two-component Gaussian mixture provides a compact approximation to photometric-redshift errors, but it does not capture every feature of realistic photo-z catalogues.
The main assumptions are:
The normalized residual distribution is independent of true redshift over the fitted sample.
The core residual mean is fixed to zero.
The core and outlier components are Gaussian.
The outlier population is described by a single Gaussian component.
The catalogue residuals are treated as independent observations.
The core component satisfies a minimum mixture-weight constraint.
The calibration catalogue is assumed to represent the population to which the fitted model will be applied.
In particular, a single global residual distribution may not adequately describe samples with strongly redshift-dependent scatter, multiple outlier populations, or significant selection effects.
The fitted mixture fraction is also model-dependent. It should not automatically be interpreted as a unique, model-independent catastrophic-outlier rate.
The method estimates the parameters of the specified statistical model, rather than reconstructing an arbitrary photo-z error distribution.
For practical examples of parameter recovery, fit diagnostics, and tomographic reconstruction, see Photometric-redshift error fitting.