The Jacobian approximation is derived from previous iterations, by retaining only the diagonal of Broyden matrices.
This algorithm may be useful for specific problems, but whether it will work may depend strongly on the problem.
Initial guess for the Jacobian is (-1/alpha).
Find a root of a function, using diagonal Broyden Jacobian approximation.
root
Interface to root finding algorithms for multivariate functions. See method=='diagbroyden'
in particular.
The following functions define a system of nonlinear equations
>>> def fun(x):
... return [x[0] + 0.5 * (x[0] - x[1])**3 - 1.0,
... 0.5 * (x[1] - x[0])**3 + x[1]]
A solution can be obtained as follows.
>>> from scipy import optimizeSee :
... sol = optimize.diagbroyden(fun, [0, 0])
... sol array([0.84116403, 0.15883384])
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them