The building blocks of NonlinearSolve's first order and quasi Newton methods, and the methods built from them.
Usage
NewtonDescent(linsolve = NULL)
SteepestDescent(linsolve = NULL)
DampedNewtonDescent(linsolve = NULL, initial_damping = 1, damping_fn = NULL)
Dogleg(linsolve = NULL)
TrustRegionScaling
MoreTrustRegionDescent(
linsolve = NULL,
scaling = TrustRegionScaling$None,
min_damping_D = 1e-08
)
GeodesicAcceleration(
descent = NewtonDescent(),
finite_diff_step_geodesic = 0.1,
alpha = 0.75
)
DescentResult(
du = NULL,
u = NULL,
success = TRUE,
linsolve_success = TRUE,
extras = list()
)
RadiusUpdateSchemes
TrustRegionSubproblem
GenericTrustRegionScheme(
method = RadiusUpdateSchemes$Simple,
max_trust_radius = 0,
initial_trust_radius = 0,
step_threshold = 0,
shrink_threshold = 0,
expand_threshold = 0,
shrink_factor = 0,
expand_factor = 0
)
GeneralizedFirstOrderAlgorithm(
descent = NewtonDescent(),
linesearch = NULL,
trustregion = NULL,
max_shrink_times = 32L,
autodiff = NULL,
jvp_autodiff = NULL,
vjp_autodiff = NULL,
concrete_jac = NULL,
jacobian_reuse = NULL,
name = "GeneralizedFirstOrderAlgorithm"
)
TrustRegionDogleg(subproblem = TrustRegionSubproblem$Dogleg, ...)
TrustRegionRobust(subproblem = MoreTrustRegionDescent(), ...)
PseudoTransient(
alpha_initial = 0.001,
linesearch = NULL,
mass_matrix = NULL,
concrete_jac = NULL,
linsolve = NULL,
autodiff = NULL,
jvp_autodiff = NULL,
vjp_autodiff = NULL,
jacobian_reuse = NULL
)
QuasiNewtonAlgorithm(
descent = NewtonDescent(),
linesearch = NULL,
update_rule = c("good_broyden", "bad_broyden", "klement"),
initialization = c("identity", "true_jacobian"),
max_resets = 100L,
reset_tolerance = NULL,
alpha = NULL,
name = "QuasiNewtonAlgorithm"
)
LimitedMemoryBroyden(
max_resets = 3L,
linesearch = NULL,
threshold = 10L,
reset_tolerance = NULL,
alpha = NULL
)
GeneralizedDFSane(
linesearch = RobustNonMonotoneLineSearch(),
sigma_min = 1e-10,
sigma_max = 1e+10,
sigma_1 = NULL,
name = "GeneralizedDFSane"
)
DFSane(
sigma_min = 1e-10,
sigma_max = 1e+10,
sigma_1 = 1,
M = 10L,
gamma = 1e-04,
tau_min = 0.1,
tau_max = 0.5,
n_exp = 2L,
max_inner_iterations = 100L,
eta_strategy = function(fn_1, n, x_n, f_n) fn_1/n^2
)
SimpleBroyden(linesearch = NULL, alpha = NULL)
SimpleKlement()
SimpleDFSane(...)
SimpleGaussNewton()
SimpleLimitedMemoryBroyden(threshold = 10L, linesearch = NULL, alpha = NULL)
SimpleHalley(autodiff = NULL)Arguments
- initial_damping, damping_fn, alpha_initial
Damping settings.
- scaling, min_damping_D
Scaling of the Moré subproblem.
- descent, linesearch, trustregion
Components, see Details.
- finite_diff_step_geodesic, alpha
Geodesic acceleration settings.
- du, u, success, linsolve_success, extras
Fields of a
DescentResult(): the step, the new point, whether the descent and its linear solve succeeded, and further results.- method
Radius update scheme.
- max_trust_radius, initial_trust_radius, step_threshold, shrink_threshold, expand_threshold, shrink_factor, expand_factor, max_shrink_times
Trust region settings (0 selects the scheme's default).
- autodiff, linsolve, concrete_jac, jvp_autodiff, vjp_autodiff, jacobian_reuse, mass_matrix
Options of the Julia signatures; Jacobians come from the problem or from finite differences.
- name
Name of the composed algorithm.
- subproblem
The trust region subproblem: a member of
TrustRegionSubproblemor a descent.- ...
Options.
- update_rule, initialization, max_resets, reset_tolerance, threshold
Quasi Newton settings.
- sigma_min, sigma_max, sigma_1, M, gamma, tau_min, tau_max, n_exp, max_inner_iterations, eta_strategy
Spectral method settings.
Details
Descents give the step du from the Jacobian J and residual fu:
NewtonDescent() solves J du = -fu (least squares when J is not
square), SteepestDescent() takes -J' fu, DampedNewtonDescent( initial_damping, damping_fn) solves (J'J + lambda D) du = -J' fu,
Dogleg() the dogleg path inside a trust region,
MoreTrustRegionDescent(scaling) the exact trust region step of Moré
(MINPACK lmpar; scaling = TrustRegionScaling$Jacobian scales by the
column norms of J, "Auto" when they differ by more than 20), and
GeodesicAcceleration(descent, finite_diff_step_geodesic, alpha) adds the
second order geodesic correction to another descent.
GeneralizedFirstOrderAlgorithm(descent, linesearch, trustregion) runs a
descent with an optional line search (see line_searches) or trust
region scheme (GenericTrustRegionScheme(method) with method one of
RadiusUpdateSchemes). TrustRegionDogleg() is the trust region with the
dogleg subproblem and TrustRegionRobust() with Moré's subproblem;
PseudoTransient(alpha_initial) is the damped Newton method with the
switched evolution relaxation of Kelley and Keyes.
QuasiNewtonAlgorithm(descent, linesearch, update_rule, initialization, max_resets) updates an approximate Jacobian ("good_broyden",
"bad_broyden" or "klement"); LimitedMemoryBroyden(threshold) keeps
the last threshold Broyden updates of the inverse Jacobian.
GeneralizedDFSane(linesearch, sigma_min, sigma_max) and DFSane() are
the derivative free spectral methods of La Cruz, Martinez and Raydan.
SimpleBroyden(), SimpleKlement(), SimpleDFSane(),
SimpleGaussNewton(), SimpleLimitedMemoryBroyden() and SimpleHalley()
(Halley's third order method, with the second derivatives by finite
differences) are the methods of SimpleNonlinearSolve.
All accept the solve() options abstol, reltol, maxiters and
termination_condition (see termination_modes).
Examples
prob <- NonlinearProblem(function(u, p) c(u[1]^2 + u[2]^2 - 2, u[1] - u[2]), c(2, 0.5))
solve(prob, DFSane())$u
#> [1] 1 1
solve(prob, LimitedMemoryBroyden())$u
#> [1] 1 1
solve(prob, GeneralizedFirstOrderAlgorithm(descent = DampedNewtonDescent()))$u
#> [1] 1 1
solve(prob, PseudoTransient())$u
#> [1] 1.8265600 0.3592583
solve(prob, SimpleHalley())$u
#> [1] 1 1