一.LM最優化算法
最優化是尋找使得目標函數有最大或最小值的的參數向量。根據求導數的方法,可分為2大類。(1)若f具有解析函數形式,知道x后求導數速度快。(2)使用數值差分來求導數。根據使用模型不同,分為非約束最優化、約束最優化、最小二乘最優化。Levenberg-Marquardt算法是最優化算法中的一種。

LM算法屬於一種“信賴域法”,所謂的信賴域法,就是從初始點開始,先假設一個可以信賴的最大位移σ,然后在以當前點為中心,以σ為半徑的區域內,通過尋找目標函數的一個近似函數(二次的)的最優點,來求解得到真正的位移。在得到了位移之后,再計算目標函數值,如果其使目標函數值的下降滿足了一定條件,那么就說明這個位移是可靠的,則繼續按此規則迭代計算下去;如果其不能使目標函數值的下降滿足一定的條件,則應減小信賴域的范圍,再重新求解。
LM算法需要對每一個待估參數求偏導,所以,如果你的擬合函數 f 非常復雜,或者待估參數相當地多,那么可能不適合使用LM算法,而可以選擇Powell算法(Powell算法不需要求導。LM收斂速度塊。但是參數應該設定一個初值,其次對於多優化解的問題,也不是很適合。
英文文檔lemar介紹比較簡潔,還包括偽代碼,請點擊下載:
(1)Principle: An iterative tech. to locate the minimum of a multivariate function (sum of squares of non-linear real-valued function).Assuming measure vector x’=f(p) ,target vector x (such as training target in classification problem) ,error vector e=x-x’:
Optimization Object:arg(p) min(||x-f(p)||)
Linear approximation: in the neighborhood of p, assuming J is Jacobian Matrix(f(p) to p) ,for a smallσ,so f(p+σ)=f(p)+σJ (Taylor Expansion) ,and
min (||x-f(p+σ)||=min(||e-Jσ||) => JTJσ=JTe (derivation to σ)
Introducing the damping term u and set N=( JTJ+uI)=> Nσ= JTe => σ
For each iteration or updata of p(p:=p+σ), u is adjusted to assure a reduction in the error e(norm-2)
(2)Merits & Defects:LM is a standard tech. fornon-linear least-squares problems:When u is set to a large value, p updates as steepest descent, otherwise updates as Gauss-Newton method.
p shall be set toarelative reliable initial value (the work of RBM model).