apply_model#
- t3toolbox.fitting.apply_model(geometry, x, ww, residual, regularizer=None, hessian='gauss_newton', curvature_damping=None)#
def apply_model( geometry, # MANIFOLD / COREWISE (or the UNIFORM_* twin for a uniform x) x: typ.Union[t3.TuckerTensorTrain, ut3.UniformTuckerTensorTrain], # the current point ww: typ.Sequence[NDArray], # sample vectors, len=d, elm_shape=W+(Ni,) residual: NDArray, # r = apply(x) − y, shape W+C regularizer: typ.Any = None, # optional regularizer, e.g. optimizers.IdentityRegularizer(λ) hessian: str = 'gauss_newton', # or 'exact' (case-insensitive): the model's mode curvature_damping: typ.Optional[float] = None, # exact only: the lift damping; None = the geometry's ) -> LocalModel:
The local model of an all-modes
applyleast-squares objective atx, ongeometry.Accepts a ragged
TuckerTensorTrain(->LocalModel) or a uniformUniformTuckerTensorTrain; the representation is inferred fromxand the geometry must match.regularizeraddsρ(x)to the model (ragged or uniform).hessian/curvature_dampingchoose the model’s mode (LocalModel):hessian='exact'adds the curvature term, on every geometry and representation (seeprobe_derivatives_model()).- Parameters:
x (t3toolbox.backend.common.typ.Union[TuckerTensorTrain, UniformTuckerTensorTrain])
ww (t3toolbox.backend.common.typ.Sequence[NDArray])
residual (NDArray)
regularizer (t3toolbox.backend.common.typ.Any)
hessian (str)
curvature_damping (t3toolbox.backend.common.typ.Optional[float])
- Return type: