Skip to content

Commit 527006d

Browse files
update theta default value
1 parent 9109051 commit 527006d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/LMTR_alg.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ function LMTR(
131131
Jt_Fk = similar(∇fk) # temporary storage
132132

133133
σmax = opnorm(Jk)
134-
νInv = (1 + θ) * σmax^2 # ‖J'J‖ = ‖J‖²
134+
νInv = σmax^2/θ # ‖J'J‖ = ‖J‖²
135135

136136
mν∇fk = -∇fk / νInv
137137

@@ -253,7 +253,7 @@ function LMTR(
253253
Jk = jac_op_residual(nls, xk)
254254
jtprod_residual!(nls, xk, Fk, ∇fk)
255255
σmax = opnorm(Jk)
256-
νInv = (1 + θ) * σmax^2 # ‖J'J‖ = ‖J‖²
256+
νInv = σmax^2/θ # ‖J'J‖ = ‖J‖²
257257
@. mν∇fk = -∇fk / νInv
258258
end
259259

src/LM_alg.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ function LM(
124124
Jt_Fk = similar(∇fk)
125125

126126
σmax = opnorm(Jk)
127-
νInv = (1 + θ) * (σmax^2 + σk) # ‖J'J + σₖ I‖ = ‖J‖² + σₖ
127+
νInv = (σmax^2 + σk)/θ # ‖J'J + σₖ I‖ = ‖J‖² + σₖ
128128

129129
s = zero(xk)
130130

@@ -251,7 +251,7 @@ function LM(
251251
if ρk < η1 || ρk == Inf
252252
σk = σk * γ
253253
end
254-
νInv = (1 + θ) * (σmax^2 + σk) # ‖J'J + σₖ I‖ = ‖J‖² + σₖ
254+
νInv = (σmax^2 + σk)/θ # ‖J'J + σₖ I‖ = ‖J‖² + σₖ
255255
tired = k maxIter || elapsed_time > maxTime
256256
end
257257

src/input_struct.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ mutable struct ROSolverOptions{R}
3434
α::R = 1 / eps(R),
3535
ν::R = eps(R)^(1 / 5),
3636
γ::R = R(3),
37-
θ::R = eps(R)^(1 / 5),
37+
θ::R = 1/(1+eps(R)^(1 / 5)),
3838
β::R = 1 / eps(R),
3939
reduce_TR::Bool = true,
4040
) where {R <: Real}

0 commit comments

Comments
 (0)