least_squares_problem#

t3toolbox.backend.optimizers.least_squares_problem(geom, kind, sample, data, regularizer=None)#
def least_squares_problem(
        geom:        GeometryOps,   # COREWISE_OPS / MANIFOLD_OPS
        kind:        typ.Any,       # backend fitting.{APPLY,ENTRIES,PROBE} or a derivative kind
        sample:      typ.Any,       # ww / index / (ww,pp) / (index,pp)
        data:        typ.Any,       # observed values
        regularizer: typ.Any = None,  # optional backend.regularization.Regularizer (e.g. IdentityRegularizer(λ))
) -> Problem:

Assemble a least-squares Problem from a geometry, a sampling kind, the sample, and the observed data, plus an optional regularizer (adds ρ(x) to the objective, folded into the local GN model). (The frontend adapter calls this with the same backend objects a raw-data user would.)

Parameters:
  • geom (GeometryOps)

  • kind (t3toolbox.backend.common.typ.Any)

  • sample (t3toolbox.backend.common.typ.Any)

  • data (t3toolbox.backend.common.typ.Any)

  • regularizer (t3toolbox.backend.common.typ.Any)

Return type:

Problem