View source: R/optim.gradientdescent.R
This functions uses the gradient descent algorithm to find the minimum of a (multi-) dimensional mathematical function.
1 2 3 4 5 6 7 | gradDescent(
f,
x0,
max.iter = 100,
step.size = 0.001,
stop.grad = .Machine$double.eps
)
|
f |
a (multi-) dimensional function to be eptimized. |
x0 |
the starting point of the optimization. |
max.iter |
the maximum number of iterations performed in the optimization. |
step.size |
the step size (sometimes referred to as 'learn-rate') of the optimization. |
stop.grad |
the stop-criterion for the gradient change. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.