Skip to main content

FamilyChannelHessian

Trait FamilyChannelHessian 

Source
pub trait FamilyChannelHessian: Send + Sync {
    // Required methods
    fn n_outputs(&self) -> usize;
    fn n_subjects(&self) -> usize;
    fn fill_subject(&self, i: usize, out: &mut [f64]);

    // Provided method
    fn evaluate_full(&self) -> Array3<f64> { ... }
}
Expand description

Per-subject channel Hessian provider for multi-output families.

The Fisher information decomposition for multi-output families is

I(β) = Σ_i  J_iᵀ W_i J_i

where J_i is the channel-stacked Jacobian (shape n_outputs × p for subject i) and W_i is the n_outputs × n_outputs per-subject channel Hessian of the row negative log-likelihood (the second-derivative block of −log L_i(u_i) at a pilot β, PSD-clamped).

For single-output families this is the scalar IRLS weight; for multi-output families (survival marginal-slope: n_outputs = 4; location-scale: n_outputs = 2) it carries full cross-channel curvature.

The identifiability canonicalisation step uses the n_outputs-channel weighted joint design W_joint = Σ_i sqrt(W_i) ⊗ J_i to detect block-against-block aliasing. When this trait is present on ParameterBlockSpec::channel_hessian, canonicalize_for_identifiability routes through audit_identifiability_channel_aware; when absent it falls back to the scalar-weight flat audit.

§W-metric rank theorem

The canonicalisation computes rank(J^T W J) where W_blkdiag = block-diagonal of per-subject W_i. This rank equals

rank(J) − dim(range(J) ∩ ker(W_blkdiag))

i.e. columns of J that lie in the kernel of W_blkdiag (flat directions in the curvature landscape at the pilot β) are correctly identified as curvature-redundant and may be dropped.

Required Methods§

Source

fn n_outputs(&self) -> usize

Number of output channels n_outputs (= K in the row Jacobian).

Source

fn n_subjects(&self) -> usize

Number of subjects (rows).

Source

fn fill_subject(&self, i: usize, out: &mut [f64])

Fill the n_outputs × n_outputs per-subject channel Hessian W_i into out (row-major, length n_outputs * n_outputs) for subject i. Negative eigenvalues must be clamped to zero (PSD projection) before or inside this call.

Provided Methods§

Source

fn evaluate_full(&self) -> Array3<f64>

Materialise the full (n_subjects × n_outputs × n_outputs) tensor. Default implementation calls fill_subject for each row.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§