Implements forward-mode automatic differentiation using dual numbers with S4 classes. Supports exact arbitrary-order derivatives through recursive nesting of duals, with high-level functions for computing gradients, Hessian matrices, and Jacobians of arbitrary functions.
dualConstructor for dual numbers.
dual_variableShorthand for dual(x, 1).
dual_constantShorthand for dual(x, 0).
dual_vectorContainer for indexable dual vectors.
dual_variable_nCreate a dual seeded for n-th order differentiation.
deriv_nExtract the k-th derivative from a nested dual result.
differentiate_nCompute f(x) and all derivatives up to order n.
Baydin, A. G., Pearlmutter, B. A., Radul, A. A., & Siskind, J. M. (2018). Automatic differentiation in machine learning: a survey. Journal of Machine Learning Research, 18(153), 1–43.
Related CRAN packages: dual, numDeriv, madness