You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to perform fit on complex function (returning complex value) there is no method for max and min between complex value and float value. My code:
functionfit_arx(freqs, T::Vector{ComplexF64})
functionarx_model(x,p)
return@.1/ ((1+1im* x / p[1]) * (1+1im* x / p[2]))
end
p0 = [1.95+0im, 20.2+0im]
curve_fit(arx_model, freqs, T, p0)
end
resulting a bug:
ERROR: MethodError: no method matching isless(::Float64, ::ComplexF64)...
possible fix:
in levenberg_marquardt.jl in increase and dreacre of trust region radius (lines 262 and 266) switch
if rho > good_step_quality
# increase trust region radius
lambda =max(lambda_decrease * lambda, MIN_LAMBDA)
endelse# decrease trust region radius
lambda =min(lambda_increase * lambda, MAX_LAMBDA)
end
to
if rho > good_step_quality
# increase trust region radius
lambda =max(abs(lambda_decrease * lambda), MIN_LAMBDA)
endelse# decrease trust region radius
lambda =min(abs(lambda_increase * lambda), MAX_LAMBDA)
end
The text was updated successfully, but these errors were encountered:
When trying to perform fit on complex function (returning complex value) there is no method for max and min between complex value and float value. My code:
resulting a bug:
ERROR: MethodError: no method matching isless(::Float64, ::ComplexF64)...
possible fix:
in levenberg_marquardt.jl in increase and dreacre of trust region radius (lines 262 and 266) switch
to
The text was updated successfully, but these errors were encountered: