regularization#

Backend regularization terms for the fitting objective min_x ½‖ω⊙(S(x)−y)‖² + ρ(x).

A Regularizer is an additive objective term ρ(X) folded into the local Gauss-Newton model (t3toolbox.backend.optimizers.LocalModel) and Problem.objective, so it composes with every optimizer, sampling kind, geometry, and representation with no changes to any of them. This layer is check-free – a raw-.data user constructs and attaches a regularizer directly, exactly as a frontend user does (design record + the razor check: docs/contributor/fitting_internals.md §Regularization).

The interface is geometry-agnostic: each method receives a GeometryOps and leans only on its primitives (point_norm_sq / point_tangent / project / inner), so the SAME regularizer works on manifold or corewise. Extending to a new regularizer (e.g. the Grasedyck-Kramer inverse-unfolding -singular-value weighting) is a new subclass with the same four methods – Problem / LocalModel / the optimizers are untouched.

Classes#

Regularizer

Protocol for a quadratic regularizer ρ(X) added to the fitting objective.

IdentityRegularizer

Identity (Tikhonov) regularization ρ(X) = ½·strength·‖X‖² in the geometry's own tangent metric.

Functions#

require_unstacked_for_regularizer(stack_shape, who)

Structural guard: a regularized fit of a STACKED point is not implemented -- raise, do not