pub fn joint_poisson_fit(
objective: &JointPoissonObjective<'_>,
params: &mut ParameterSet,
config: &JointPoissonFitConfig,
) -> Result<JointPoissonResult, FittingError>Expand description
Two-stage joint-Poisson fit: damped Fisher stage followed by Nelder-Mead polish.
Memo 35 §P1 + §P2 requirements this function satisfies:
- Minimizes the conditional binomial deviance
D(θ)(JointPoissonObjective::deviance), not fixed-flux Poisson NLL. - Reports
D / (n − k)as the primary GOF (P1.2). - Honours an explicit
c = Q_s/Q_obstored in the objective (P1.3). - Runs Nelder-Mead polish after the gradient stage to escape the EG2-S1 C_full initial-point stall (P2.1).
- Exposes
gn_convergedandpolish_convergedseparately so callers do not rely on a single “success” flag — acceptance is meant to come from the deviance value (P2.3).
The damped-Fisher stage uses LM-style acceptance: a step is accepted if it satisfies an Armijo condition on D; on rejection, λ is increased and the step is recomputed. Bounds are enforced via projection (clamp).