Skip to content

Commit 7194f37

Browse files
revert changes to LM & LMTR, revert theta default value
1 parent 0ba4192 commit 7194f37

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
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 = σmax^2/θ # ‖J'J‖ = ‖J‖²
134+
νInv = (1 + θ) * σ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 = σmax^2/θ # ‖J'J‖ = ‖J‖²
256+
νInv = (1 + θ) * σ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 = (σmax^2 + σk)/θ # ‖J'J + σₖ I‖ = ‖J‖² + σₖ
127+
νInv = (1 + θ) * (σ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 = (σmax^2 + σk)/θ # ‖J'J + σₖ I‖ = ‖J‖² + σₖ
254+
νInv = (1 + θ) * (σmax^2 + σk) # ‖J'J + σₖ I‖ = ‖J‖² + σₖ
255255
tired = k maxIter || elapsed_time > maxTime
256256
end
257257

src/RegularizedOptimization.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ include("splitting.jl")
1919
include("TR_alg.jl")
2020
include("TRDH_alg.jl")
2121
include("R2_alg.jl")
22+
include("LM_alg.jl")
23+
include("LMTR_alg.jl")
2224
include("R2DH.jl")
2325
include("R2NModel.jl")
2426
include("R2N.jl")
25-
include("LM_alg.jl")
26-
include("LMTR_alg.jl")
2727
include("AL_alg.jl")
2828

2929
end # module RegularizedOptimization

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 = 1/(1+eps(R)^(1 / 5)),
37+
θ::R = eps(R)^(1 / 5),
3838
β::R = 1 / eps(R),
3939
reduce_TR::Bool = true,
4040
) where {R <: Real}

0 commit comments

Comments
 (0)