Skip to main content

Module poisson

Module poisson 

Source
Expand description

Poisson-likelihood fitting of counts.

Minimizes half the Poisson deviance plus a Gaussian prior on each block θₚ of measured parameters,

D(θ) = Σᵢ [μᵢ(θ) − yᵢ + yᵢ ln(yᵢ / μᵢ(θ))] + ½ Σₚ (θₚ − mₚ)ᵀ Cₚ⁻¹ (θₚ − mₚ)

within box bounds, by projected Levenberg–Marquardt steps in the Fisher metric, for models with an analytical Jacobian. A prior adds Cₚ⁻¹ to the information, as SAMMY’s Bayes update M′⁻¹ = M⁻¹ + GᵀV⁻¹G adds the data to a prior covariance M (SAMMY manual, docs/tex/fitting-procedure.tex, eq. bayes-eq-m-prime).

Structs§

InformationInverse
The inverses of the expected information information of rows counts, split as poisson_fit splits its directions into those its steps take and those its covariance keeps. In the information scaled to a unit diagonal, its own or, for an information with other parameters profiled out, the one it had before, spanned keeps every eigen-direction whose eigenvalue is above the eigendecomposition’s rounding, ε·max(rows, k) times the largest, k the number of parameters with information, and determined keeps those of them whose eigenvalue is also at least 1e-12; where that rounding exceeds 1e-12, it is the cutoff of both. A parameter with no information has a zero row and column in both. resolved[i] is whether parameter i has information and, beyond rounding, no component along a direction determined leaves out; undetermined holds those directions, in the parameters’ units.
PoissonConfig
Configuration for the Poisson solvers.
PoissonResult
Result of poisson_fit.
Prior
A Gaussian prior on free parameters: a measurement of them made elsewhere, with mean m and covariance C = LLᵀ.
Unbounded
The expected-information (Fisher scoring) expansion of the objective at the fit over every free parameter, bounds left out: covariance F⁻¹, F the expected information of all free parameters, and mean θ̂ − F⁻¹g, g the objective’s gradient at the fit, which the convergence test makes negligible off the bounds. Both are taken over the directions the counts and priors determine; the mean and the rows and columns of a parameter with a component along a direction they do not determine are NaN. With none on a bound the covariance is PoissonResult::covariance.

Constants§

NEWTON_DECREMENT_TOL
The expected-information Newton decrement below which poisson_fit reports a minimum.

Functions§

half_deviance
obs·ln(obs/mean) + mean − obs, by C. Loader’s bd0 (“Fast and accurate computation of binomial probabilities”, 2000): a series in v = (obs − mean)/(obs + mean) when |obs − mean| < 0.1 (obs + mean). For obs ≥ 0 and mean > 0; 0 when both are 0, and +∞ when only mean is.
information_inverse
InformationInverse of information, the expected information of rows counts, scaled to diagonal.
poisson_fit
Fit params to the counts y_obs by minimizing half the Poisson deviance plus ½(θₚ − mₚ)ᵀCₚ⁻¹(θₚ − mₚ) for each of the priors, within the parameter bounds.