Learn R Programming

salad (version 1.2)

Simple Automatic Differentiation

Description

Handles both vector and matrices, using a flexible S4 class for automatic differentiation. The method used is forward automatic differentiation. Many functions and methods have been defined, so that in most cases, functions written without automatic differentiation in mind can be used without change.

Copy Link

Version

Install

install.packages('salad')

Monthly Downloads

509

Version

1.2

License

MIT + file LICENSE

Last Published

December 18th, 2024

Functions in salad (1.2)

matrix

Methods for `matrix`, `array`, `as.matrix` and `as.vector`
dualFun1

Defining in-house derivatives
shape

Dual objects length, dim, names and dimnames
dual-class

dual class
dual

Dual objects
salad

Salad options
inversion

Determinant and matrix inversion for dual matrices
Extract

Extract or replace parts of an object
matmult

Matrix Arithmetic
optiWrap

Wrapper for optimisation with automatically computed gradient
t

Transposition of matrices and arrays
Summary

Summary methods for objects of class dual
rep

Replicate elements of a dual vector
ifelse

Conditionnal Element Selection
outer

Outer product for dual objects
gradient.descent

Gradient descent
diag

Matrix diagonals
d

get list of derivatives
Comparison

Comparison Operators
dnorm

Normal distribution
bind

Binding methods for dual objects
colSums

Row and column sums and means
c

Concatenation methods
MathFun

Mathematical functions
apply,dual-method

Apply functions over array margins of dual objects
Arithmetic

Arithmetic Operators