fitting ======= .. py:module:: t3toolbox.backend.fitting .. autoapi-nested-parse:: Sampling-kind primitives for the geometry-generic Gauss-Newton fitting model. The Gauss-Newton model ``m(p) = c + gᵀp + ½ pᵀ(JᵀJ)p`` of a least-squares objective factors over two *independent* choices, and the fitting layer is generic in both: * the sampling **kind** (apply / entries / probe) -- the bare single-sample Jacobian ``𝒥`` / its transpose ``𝒥ᵀ`` (from :py:mod:`t3toolbox.backend.probing`), plus the kind-specific ``‖·‖²`` reduction over the sample stack; and * the **geometry** (manifold / corewise) -- the gauge projection ``Π`` (``geometry.project``), with the Riemannian forward ``J = 𝒥∘Π`` and gradient ``Jᵀr = Π∘𝒥ᵀr``. This module supplies the **kind** half: a :py:class:`SamplingKind` descriptor bundling the bare probing primitives + the reduction per kind (:py:data:`APPLY` / :py:data:`ENTRIES` / :py:data:`PROBE`). The **geometry** half lives in the geometry (:py:data:`t3toolbox.manifold.MANIFOLD` / :py:data:`~t3toolbox.manifold.COREWISE`); the frontend :py:class:`t3toolbox.fitting.GaussNewtonModel` composes the two. The §6.3 corewise substitution ``(U,O,P,Q) -> (U,G,G,G)`` is now nothing but ``CorewiseGeometry.frame`` -- there is no separate corewise backend. ``probe`` is vector-valued (one free mode per probe), so its residual / forward output is a sequence of ``d`` arrays and its reduction sums the free mode too; apply / entries are the scalar all-modes special case. The objective constant ``c = ½‖r‖²`` is just ``½ · sumsq(r)`` (the same reduction as the model's quadratic term ``½‖𝒥Πp‖²``), so the kind needs no separate objective function. Attributes ---------- .. autoapisummary:: t3toolbox.backend.fitting.APPLY t3toolbox.backend.fitting.ENTRIES t3toolbox.backend.fitting.PROBE Classes ------- .. toctree:: :hidden: /autoapi/t3toolbox/backend/fitting/SamplingKind .. autoapisummary:: t3toolbox.backend.fitting.SamplingKind Functions --------- .. toctree:: :hidden: /autoapi/t3toolbox/backend/fitting/sumsq_over_samples /autoapi/t3toolbox/backend/fitting/sumsq_over_probes /autoapi/t3toolbox/backend/fitting/block_sumsq_over_samples /autoapi/t3toolbox/backend/fitting/block_sumsq_over_probes /autoapi/t3toolbox/backend/fitting/probe_kind /autoapi/t3toolbox/backend/fitting/apply_derivatives_kind /autoapi/t3toolbox/backend/fitting/entries_derivatives_kind /autoapi/t3toolbox/backend/fitting/probe_derivatives_kind .. autoapisummary:: t3toolbox.backend.fitting.sumsq_over_samples t3toolbox.backend.fitting.sumsq_over_probes t3toolbox.backend.fitting.block_sumsq_over_samples t3toolbox.backend.fitting.block_sumsq_over_probes t3toolbox.backend.fitting.probe_kind t3toolbox.backend.fitting.apply_derivatives_kind t3toolbox.backend.fitting.entries_derivatives_kind t3toolbox.backend.fitting.probe_derivatives_kind Module Contents --------------- .. py:data:: APPLY .. py:data:: ENTRIES .. py:data:: PROBE