mc_sgd ====== .. py:function:: t3toolbox.optimizers.mc_sgd(geometry, kind, sample, data, x0, rng, batch, order = None, weight = None, draw = None, use_jit = False, regularizer = None, chunk_size = 'auto', **kwargs) .. code-block:: python def mc_sgd( geometry, # ragged/uniform MANIFOLD (intended) / COREWISE (must match x0) 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 rng, # np.random.Generator -- passed to the draw each step batch: int, # measurements per minibatch (default flat draw; ignored if draw given) order: typ.Optional[int] = None, weight: typ.Optional[typ.Any] = None, # residual weight ω: per-mode (probe) / ω[mode,order] (derivatives) draw: typ.Optional[typ.Callable] = None, # custom draw(rng)->(sample_B,data_B); None = flat use_jit: bool = False, # jit the per-step kernel: auto-converts x0/sample/data to jax -> a jax-backed float32 result; raises if jax absent regularizer: typ.Any = None, # optional regularizer, e.g. optimizers.IdentityRegularizer(λ) (ragged only); scaled by batch/n per step chunk_size: typ.Any = 'auto', # probe_derivatives 𝒥ᵀ memory chunk; 'auto' -> estimate_chunk_size (docs/chunking.md) **kwargs, # forwarded to backend.optimizers.mc_sgd (max_iter, check_every, ...) ) -> typ.Tuple[Point, dict]: Manifold Cauchy SGD -- minibatched, tuning-free Cauchy step. Ragged or uniform ``x0`` (see :py:func:`gradient_descent`). A ``regularizer`` (ragged only) is scaled by ``batch/n`` per step so ``λ`` matches the full-batch optimizers. See :py:func:`t3toolbox.backend.optimizers.mc_sgd`.