-
Notifications
You must be signed in to change notification settings - Fork 80
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
Fit complex y-data #239
base: master
Are you sure you want to change the base?
Fit complex y-data #239
Conversation
Automatically reinterpret complex data and model to fit complex data. Domain and parameters are strictly real.
I haven't seen the fix proposed in #163 by @kagalenko-m-b. This PR deals only with complex y-data; PR 163 with complex domain too; I have not seen any literature for this case. |
You're dispatching on the type of |
Then it will fall back to the original |
Unfortunately, Julia is not Haskell and can not dispatch on the function argument's signature, which is what you really need here. |
So there is nothing left to do except for asking the user to separate manually the real from the imaginary part as it was suggested in your #163? |
There're two questions here, really - complex optimization domain and complex-valued model. Your PR assumes that both model input and output are either real or complex (and have the same numerical precision), but that's too restrictive. For example, what if I need to fit a complex exponent of an unknown, but real frequency to a set of complex measurements? |
My PR assumes that model and |
Sorry, read the source and your initial comment rather carelessly. Indeed, this PR is about complex-valued
is about complex model parameters. There is no other way, other then requesting a user to indicate somehow that he wants optimization over the complex domain, in my opinion. Once we have this indication, splitting into real and imaginary part may be done programmatically, for instance, by the As for complex model and/or ydata, that is handled completely by #163. The dispatch on complex/real is done by Julia's std library functions like |
Automatically reinterpret complex data and model to fit complex data. Domain and parameters are strictly real.