mc_sgd#
- 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)#
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(seegradient_descent()). Aregularizer(ragged only) is scaled bybatch/nper step soλmatches the full-batch optimizers. Seet3toolbox.backend.optimizers.mc_sgd().- Parameters:
kind (str)
sample (Any)
data (Any)
x0 (Point)
batch (int)
order (Optional[int])
weight (Optional[Any])
draw (Optional[Callable])
use_jit (bool)
regularizer (Any)
chunk_size (Any)
- Return type:
Tuple[Point, dict]