scipy.optimize.

BroydenFirst#

class scipy.optimize.BroydenFirst(alpha=None, reduction_method='restart', max_rank=None)[source]#

使用 Broyden 的第一種 Jacobian 近似法,尋找函數的根。

此方法也稱為「Broyden 好的方法」。

參數:
%(params_basic)s
%(broyden_params)s
%(params_extra)s

參見

root

多變數函數尋根演算法的介面。特別參見 method='broyden1'

註解

此演算法實作了反 Jacobian 擬牛頓更新

\[H_+ = H + (dx - H df) dx^\dagger H / ( dx^\dagger H df)\]

這對應於 Broyden 的第一種 Jacobian 更新

\[J_+ = J + (df - J dx) dx^\dagger / dx^\dagger dx\]

參考文獻

[1]

B.A. van der Rotten,博士論文,「A limited memory Broyden method to solve high-dimensional systems of nonlinear equations」。Mathematisch Instituut, Universiteit Leiden, 荷蘭 (2003)。 https://math.leidenuniv.nl/scripties/Rotten.pdf

範例

以下函數定義了一個非線性方程式系統

>>> def fun(x):
...     return [x[0]  + 0.5 * (x[0] - x[1])**3 - 1.0,
...             0.5 * (x[1] - x[0])**3 + x[1]]

可以透過以下方式獲得解決方案。

>>> from scipy import optimize
>>> sol = optimize.broyden1(fun, [0, 0])
>>> sol
array([0.84116396, 0.15883641])

方法

aspreconditioner

matvec

rmatvec

rsolve

setup

solve

todense

update