atmtools / arts

The Atmospheric Radiative Transfer Simulator
https://www.radiativetransfer.org/
Other
66 stars 29 forks source link

Eigenvalue decomposition derivatives needed #291

Open riclarsson opened 3 years ago

riclarsson commented 3 years ago

Hi,

This is somewhat of an open issue. An eigenvalue decomposition is necessary for line mixing ECS computations to be effective. This is done. We also need partial derivatives w.r.t. user input to fit with the rest of ARTS. I would like these derivatives to be analytical but I do not know how to take the partial derivatives of an eigenvalue decomposition. I need help here.

The specific function has been marked "FIXME: (Added 2021-01-19; Richard Larsson)" and is located in linemixing.cc at lines 13-58 at the merging of #281 . I can add computations of dW, dpop, and ddip if someone knows how to perform the required computations.

nuitlejour commented 11 months ago

will this help? https://mathoverflow.net/questions/77057/partial-derivatives-of-eigen-value-decomposition-or-singular-value-decomposition

riclarsson commented 11 months ago

@nuitlejour Thank you for the suggestion! The answer pertains to real symmetrical matrices as far as I understand it. The matrix I need to compute is neither, so I do not believe it should apply. Sadly.

I am going to have a look through the suggested book, though this will take some time to dig through.

nuitlejour commented 11 months ago

use svd first, and the analytical derivatives on svd is quite simple, and does not require square or real matrix: https://chat.openai.com/share/d76798ad-a00d-4e61-be19-c2905d20df90 and using the relationship between svd and eigenvalue decomposition: https://en.wikipedia.org/wiki/Singular_value_decomposition eigenvalue decomposition can be calculated. snap1 snap2

nuitlejour commented 11 months ago

and also, I think in many cases, eigenvalue decomposition is not really needed, svd is more general. maybe formulate 'line mixing ECS computations' with svd will be a better idea.