search for: newtonraphson

Displaying 2 results from an estimated 2 matches for "newtonraphson".

2010 Oct 27
0
Introducing the futile.paradigm, a package for functional dispatching in R
...<- 0 old.x <- x0 while (step < max.steps) { # Calls abstract function 'iterate' with definitions below new.x <- iterate(old.x, algo) if (converged(new.x, old.x)) break old.x <- new.x } new.x } # Implement Newton-Raphson iterate.nr %when% (algo %isa% NewtonRaphson) iterate.nr <- function(x, algo) x - algo$f1(x) / algo$f2(x) # Implement Gradient Descent iterate.gd %when% (algo %isa% GradientDescent) iterate.gd <- function(x, algo) x - algo$step * algo$f1(x) # Create a custom type constructor create.GradientDescent <- function(T, f1, step=0.01) list...
2010 Oct 27
0
Introducing the futile.paradigm, a package for functional dispatching in R
...<- 0 old.x <- x0 while (step < max.steps) { # Calls abstract function 'iterate' with definitions below new.x <- iterate(old.x, algo) if (converged(new.x, old.x)) break old.x <- new.x } new.x } # Implement Newton-Raphson iterate.nr %when% (algo %isa% NewtonRaphson) iterate.nr <- function(x, algo) x - algo$f1(x) / algo$f2(x) # Implement Gradient Descent iterate.gd %when% (algo %isa% GradientDescent) iterate.gd <- function(x, algo) x - algo$step * algo$f1(x) # Create a custom type constructor create.GradientDescent <- function(T, f1, step=0.01) list...