-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
InexactError when optimizing Complex-valued function #127
Comments
The reason for this is that in levenberg_marquardt.jl we require the value of the jacobian of the function-to-be-fitted. To compute it, we rely on If you try
Now, In order words, you should rather open a ticket in |
Thanks for the example. I'll keep it in mind when changing "optimization backend" in the near future. |
Have there been any changes to allow for complex valued data to be used within |
A quick look at the literature reveals that the Levenberg-Marquardt is only defined for real-valued functions. |
I'm trying to optimize a real-valued parameter to minimize a complex-valued least-squares problem.
Here's a MWE that demonstrates the problem. The basic idea is that you have a signal (
x
) and a delayed version of that signal (x2
), and the object is to estimate the delay. We perform the delay in the frequency domain so that we can handle fractional-sample delays.So the delay
D
is what we're trying to optimize for, and the objective function is the least-squares difference (sum(abs2.(X2 - model(X)))
) in the spectra.Running
curve_fit
gives anInexactError
- it looks like it's trying to assign a complex value into a real-valued array.The text was updated successfully, but these errors were encountered: