View source: R/calibrar-gradient.R
gradient | R Documentation |
This function calculates the gradient of a function, numerically, including the possibility of doing it in parallel.
gradient(fn, x, method, control, parallel, ...)
fn |
The function to calculate the gradient. |
x |
The value to compute the gradient at. |
method |
The method used. Currently implemented: central, backward, forward and Richardson. See details. |
control |
A list of control arguments. |
parallel |
Boolean, should numerical derivatives be calculated in parallel? |
... |
Additional arguments to be passed to |
The gradient of fn
at x
.
gradient(fn=function(x) sum(x^3), x=0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.