Structs§
- Canonical
Penalty - A canonicalized penalty with block-local root, ready for the solver.
- Engine
Dims - Minimal engine layout descriptor that avoids domain-specific layout coupling.
- Kronecker
Reparam Result - Result of Kronecker-factored reparameterization.
- Penalty
Matrix - Reparam
Invariant - Lambda-independent reparameterization invariants derived from penalty structure.
- Reparam
Result - Result of the stable reparameterization algorithm from Wood (2011) Appendix B
Enums§
Functions§
- calculate_
condition_ number - Calculate the 2-norm condition number of a matrix.
- canonicalize_
penalty_ spec - Canonicalize a single
PenaltySpecinto aCanonicalPenaltyby computing the block-local eigendecomposition and extracting the root. - canonicalize_
penalty_ specs - Canonicalize a batch of penalty specs, dropping zero-rank penalties. Returns (active_penalties, active_nullspace_dims).
- create_
balanced_ penalty_ root_ from_ canonical - Creates a balanced penalty root from canonical penalties.
- kronecker_
logdet_ and_ derivatives - Compute
log|S|₊and its first/second derivatives w.r.t.ρ_k = log(λ_k)from factored marginal eigenvalues. - kronecker_
product - Computes the Kronecker product A ⊗ B for penalty matrix construction. This is used to create tensor product penalties that enforce smoothness in multiple dimensions for interaction terms.
- kronecker_
reparameterization_ engine - Kronecker-factored reparameterization for tensor-product penalties.
- precompute_
reparam_ invariant_ from_ canonical - Precompute the lambda-invariant reparameterization structure from canonical penalties.
- report_
penalty_ pair_ redundancy - Detect and report structurally identical (or near-identical) penalty pairs in the canonical bundle.
- stable_
reparameterization_ engine_ canonical - Engine-facing stable reparameterization API using only
(p, k). - stable_
reparameterizationwith_ invariant - Apply stable reparameterization using precomputed lambda-invariant structures.