Expand description
Multivariable symbolic differentiation — gradient, Jacobian, Hessian (Calculus
plan §3, the ★★ standout). Built on the CAS’s existing single-variable
differentiate, so every partial is a
symbolic, provenance-bearing derivative (citable via the CAS’s to_quins/
expr_citation_hash) — honest math, not a black-box autodiff number.
Why this is the highest-demand gap: the learning spine needs it now — IRLS
(logistic/Poisson GLM) needs the gradient + Hessian, the Bayesian Laplace
approximation needs the Hessian of the log-posterior, and second-order optimisers
need a Hessian. The symbolic forms here are differentiated once, then evaluated
numerically at a point (gradient_at/hessian_at) for those consumers.
No hot kernel (symbolic); the numeric evaluation of a gradient at scale is the
bridge’s DenseLinear/ElementwiseMap case.
Functions§
- gradient
- The gradient
∇f = [∂f/∂x₁, …, ∂f/∂xₙ]as one simplified expression per variable. - gradient_
at - Evaluate the gradient numerically at
point(variable → value).Noneif any partial fails to evaluate there (e.g. a division by zero in the domain). - hessian
- The Hessian
H[i][j] = ∂²f/∂xᵢ∂xⱼas ann×nmatrix of simplified expressions. Symmetric by Clairaut’s theorem (computed both ways implicitly via repeated differentiation). - hessian_
at - Evaluate the Hessian numerically at
point.Noneif any entry fails to evaluate. - jacobian
- The Jacobian of a vector of expressions: row
iis∇fᵢ. Shapeexprs.len() × vars.len(). - partial
∂expr/∂var— a single partial derivative (simplified). Thin alias over the CAS.