Package: salad 1.2
Hervé Perdry
salad: Simple Automatic Differentiation
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.
Authors:
salad_1.2.tar.gz
salad_1.2.tar.gz(r-4.5-noble)salad_1.2.tar.gz(r-4.4-noble)
salad_1.2.tgz(r-4.4-emscripten)salad_1.2.tgz(r-4.3-emscripten)
salad.pdf |salad.html✨
salad/json (API)
NEWS
# Install 'salad' in R: |
install.packages('salad', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org')) |
This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.
Last updated 5 days agofrom:1dd90732cc. Checks:OK: 2. Indexed: yes.
Target | Result | Date |
---|---|---|
Doc / Vignettes | OK | Dec 18 2024 |
R-4.5-linux | OK | Dec 18 2024 |
Exports:%o%applyarrayas.matrixatan2betacbind2choosecolMeanscolSumsddetdiagdiag<-dnormdnorm.dualdualdualFun1gradient.descentifelselbetalchooselogNepermatrixmatrixprod_ddmatrixprod_dnmatrixprod_ndoptiWrapouterpsigammarbind2rowMeansrowSumssaladsolvevaluevarnameswhich.maxwhich.min
Dependencies:
Readme and manuals
Help Manual
Help page | Topics |
---|---|
Apply functions over array margins of dual objects | apply,dual-method |
Arithmetic Operators | *,dual,dual-method *,dual,numeric-method *,numeric,dual-method +,dual,dual-method +,dual,missing-method +,dual,numericOrArray-method +,numericOrArray,dual-method -,dual,dual-method -,dual,missing-method -,dual,numericOrArray-method -,numericOrArray,dual-method /,dual,dual-method /,dual,numeric-method /,numeric,dual-method Arithmetic ^,dual,dual-method ^,dual,numeric-method ^,numeric,dual-method |
Binding methods for dual objects | bind cbind2,dual,dual-method cbind2,dual,missing-method cbind2,dual,numericOrArray-method cbind2,numericOrArray,dual-method rbind2,dual,dual-method rbind2,dual,missing-method rbind2,dual,numericOrArray-method rbind2,numericOrArray,dual-method rbind2_dd |
Concatenation methods | c c,numericOrArray-method c-dual concat0 |
Row and column sums and means | colMeans colMeans,dual-method colMeans.dual colSums colSums,dual-method colSums.dual rowMeans rowMeans,dual-method rowMeans.dual rowSums rowSums,dual-method rowSums.dual |
Comparison Operators | Compare,dual,ANY-method Comparison |
get list of derivatives | d d.dual d.numeric value value.dual value.numeric varnames varnames.dual varnames.numeric |
Matrix diagonals | diag diag,dual-method diag.dual diag<-,dual,dual-method diag<-,dual,numericOrArray-method |
Normal distribution | dnorm dnorm.dual |
Dual objects | dual |
dual class | dual-class |
Defining in-house derivatives | dualFun1 |
Extract or replace parts of an object | Extract [,dual,index,index-method [,dual,index,missing-method [,dual,missing,index-method [,dual,missing,missing-method [<-,dual,index,index,dual-method [<-,dual,index,index,logicalOrNumericOrArray-method [<-,dual,index,missing,dual-method [<-,dual,index,missing,logicalOrNumericOrArray-method [<-,dual,missing,index,dual-method [<-,dual,missing,index,logicalOrNumericOrArray-method [<-,dual,missing,missing,dual-method [<-,dual,missing,missing,logicalOrNumericOrArray-method |
Gradient descent | gradient.descent |
Conditionnal Element Selection | ifelse ifelse,ANY,dual,numericOrArrayOrDual-method ifelse,ANY,numericOrArray,dual-method |
Determinant and matrix inversion for dual matrices | det det,dual-method det.dual determinant determinant.dual inversion solve solve,dual,dual-method solve,dual,missing-method solve,dual,numericOrArray-method solve,numericOrArray,dual-method |
Mathematical functions | abs.dual acos.dual acosh.dual asin.dual asinh.dual atan.dual atan2,dual,dual-method atan2,dual,numericOrArray-method atan2,numericOrArray,dual-method atanh.dual beta,dual,dual-method beta,dual,numericOrArray-method beta,numericOrArray,dual-method ceiling.dual choose,dual,numeric-method cos.dual cosh.dual cospi.dual digamma.dual exp.dual expm1.dual factorial.dual floor.dual gamma.dual lbeta,dual,dual-method lbeta,dual,numericOrArray-method lbeta,numericOrArray,dual-method lchoose,dual,numeric-method lfactorial.dual lgamma.dual log.dual log10.dual log1p.dual log2.dual logNeper MathFun psigamma,dual-method psigamma.dual sign.dual sin.dual sinh.dual sinpi.dual sqrt.dual tan.dual tanh.dual tanpi.dual trigamma.dual trunc.dual |
Matrix Arithmetic | %*%,dual,dual-method %*%,dual,numericOrArray-method %*%,numericOrArray,dual-method crossprod,dual,dual-method crossprod,dual,missing-method crossprod,dual,numericOrArray-method crossprod,numericOrArray,dual-method matmult matrixprod_dd matrixprod_dn matrixprod_nd tcrossprod,dual,dual-method tcrossprod,dual,missing-method tcrossprod,dual,numericOrArray-method tcrossprod,numericOrArray,dual-method |
Methods for `matrix`, `array`, `as.matrix` and `as.vector` | array,dual-method as as.matrix,dual-method as.matrix.dual as.vector,dual-method as.vector.dual matrix matrix,dual-method |
Wrapper for optimisation with automatically computed gradient | optiWrap |
Outer product for dual objects | %o%,dual,dual-method %o%,dual,numericOrArray-method %o%,numericOrArray,dual-method outer outer,dual,dual-method outer,dual,numericOrArray-method outer,numericOrArray,dual-method outer.dual |
Replicate elements of a dual vector | rep rep.dual |
Salad options | salad |
Dual objects length, dim, names and dimnames | dim.dual dim<-.dual dimnames.dual dimnames<-.dual length.dual names.dual names<-.dual shape |
Summary methods for objects of class dual | max max,numericOrArray-method max.dual min min,numericOrArray-method min.dual prod prod,numericOrArray-method prod.dual range range,numericOrArray-method range.dual sum sum,numericOrArray-method sum.dual Summary which.max which.max,dual-method which.min which.min,dual-method |
Transposition of matrices and arrays | aperm aperm.dual t t.dual |