gradient_descent#

t3toolbox.optimizers.gradient_descent(geometry, kind, sample, data, x0, order=None, weight=None, regularizer=None, chunk_size='auto', **kwargs)#
def gradient_descent(
        geometry,                       # ragged or uniform geometry singleton (must match x0's representation)
        kind:     str,                  # 'apply' / 'entries' / 'probe' (+ '_derivatives')
        sample:   typ.Any,              # ww / index, or (ww, pp) / (index, pp) for derivatives
        data:     typ.Any,             # observed values to fit
        x0:       Point,                # initial point (any cores; the geometry orthogonalizes internally)
        order:    typ.Optional[int] = None,  # derivative kinds: highest order (required)
        weight:   typ.Optional[typ.Any] = None,  # residual weight ω: per-mode (probe) / ω[mode,order] (derivatives)
        regularizer: typ.Any = None,    # optional regularizer, e.g. optimizers.IdentityRegularizer(λ) (ragged only)
        chunk_size: typ.Any = 'auto',   # probe_derivatives 𝒥ᵀ memory chunk; 'auto' -> estimate_chunk_size (docs/chunking.md)
        **kwargs,                       # forwarded to backend.optimizers.gradient_descent (n_iter, gtol_rel, ...)
) -> typ.Tuple[Point, dict]:            # (x_opt, stats)

Fit x to data by steepest descent (Cauchy step + Armijo line search) on geometry.

Accepts a ragged TuckerTensorTrain (with manifold.MANIFOLD / COREWISE) or a uniform UniformTuckerTensorTrain (with uniform_manifold.UNIFORM_MANIFOLD / UNIFORM_COREWISE); the representation is inferred from x0 and returned in kind. Pass regularizer (e.g. optimizers.IdentityRegularizer(λ)) to add ρ(x) to the objective (ragged only for now). See t3toolbox.backend.optimizers.gradient_descent().

Parameters:
  • kind (str)

  • sample (Any)

  • data (Any)

  • x0 (Point)

  • order (Optional[int])

  • weight (Optional[Any])

  • regularizer (Any)

  • chunk_size (Any)

Return type:

Tuple[Point, dict]