scipy 1.8.0 Pypi GitHub Homepage
Other Docs
Parameters
_root_broyden1_doc()

Parameters

nit : int, optional

Number of iterations to make. If omitted (default), make as many as required to meet tolerances.

disp : bool, optional

Print status to stdout on every iteration.

maxiter : int, optional

Maximum number of iterations to make. If more are needed to meet convergence, NoConvergence is raised.

ftol : float, optional

Relative tolerance for the residual. If omitted, not used.

fatol : float, optional

Absolute tolerance (in max-norm) for the residual. If omitted, default is 6e-6.

xtol : float, optional

Relative minimum step size. If omitted, not used.

xatol : float, optional

Absolute minimum step size, as determined from the Jacobian approximation. If the step size is smaller than this, optimization is terminated as successful. If omitted, not used.

tol_norm : function(vector) -> scalar, optional

Norm to use in convergence check. Default is the maximum norm.

line_search : {None, 'armijo' (default), 'wolfe'}, optional

Which type of a line search to use to determine the step size in the direction given by the Jacobian approximation. Defaults to 'armijo'.

jac_options : dict, optional

Options for the respective Jacobian approximation.

alpha

alpha

reduction_method

reduction_method

max_rank

max_rank

Examples

>>> def func(x):
...  return np.cos(x) + x[::-1] - [1, 2, 3, 4] ...
>>> from scipy import optimize
... res = optimize.root(func, [1, 1, 1, 1], method='broyden1', tol=1e-14)
... x = res.x
... x array([4.04674914, 3.91158389, 2.71791677, 1.61756251])
>>> np.cos(x) + x[::-1]
array([1., 2., 3., 4.])
See :

Local connectivity graph

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


GitHub : /scipy/optimize/_root.py#354
type: <class 'function'>
Commit: