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
$f_{ij} = f_i(x_j)$ is the fixed shape. $c_i(\vartheta)$ is the complex number coupling of $f_{i}(x)$.
It could be some combination of real fit parameters $\vartheta$.
The analytic gradient is simple based on the complex number.
Here we define some simple intermediate variable, and using Einstein summation convention,
Base on the complex grdients relation $\frac{\partial \ln L}{\partial c_i^\star}=(\frac{\partial \ln L }{\partial c_i})^\star$, we can convert it to real value using
$$\frac{\partial \ln L}{\partial x_i}=\frac{\partial \ln L }{\partial c_i}\frac{\partial c_i }{\partial x_i} + \frac{\partial \ln L }{\partial c_i^\star}\frac{\partial c_i^\star}{\partial x_i} = 2Re(\frac{\partial \ln L }{\partial c_i}). $$
$$\frac{\partial \ln L}{\partial y_i} = \frac{\partial \ln L }{\partial c_i}\frac{\partial c_i }{\partial y_i} + \frac{\partial \ln L }{\partial c_i^\star}\frac{\partial c_i^\star}{\partial y_i} = -2Im(\frac{\partial \ln L }{\partial c_i}). $$
and polar version $\frac{\partial \ln L}{\partial \rho_i} = 2Re (\frac{\partial \ln L }{\partial c_i} \exp(i\phi_i)). $$\frac{\partial \ln L}{\partial \phi_i} = -2\rho_i Im(\frac{\partial \ln L }{\partial c_i} \exp(i\phi_i)). $
Then we can combine it with the jacobian of $c_i(\vartheta)$ to get the final gradients of $\frac{\partial \ln L}{\partial \vartheta}$.