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
xtodataby steepest descent (Cauchy step + Armijo line search) ongeometry.Accepts a ragged
TuckerTensorTrain(withmanifold.MANIFOLD/COREWISE) or a uniformUniformTuckerTensorTrain(withuniform_manifold.UNIFORM_MANIFOLD/UNIFORM_COREWISE); the representation is inferred fromx0and returned in kind. Passregularizer(e.g.optimizers.IdentityRegularizer(λ)) to addρ(x)to the objective (ragged only for now). Seet3toolbox.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]