Closed marscher closed 6 years ago
Hey @marscher, are we already sorting the eigenvalues separately by real and imaginary parts in this test? It seems the results are fine, only the pair of conjugate eigenvalues is swapped.
On 09/17/2018 12:10 PM, Feliks Nüske wrote:
Hey @marscher https://github.com/marscher, are we already sorting the eigenvalues separately by real and imaginary parts in this test? Yes we are.
It seems the results are fine, only the pair of conjugate eigenvalues is swapped.
So is it sufficient to take the absolute value of the imaginary part into account?
Yes.
https://github.com/marscher/PyEMMA/commit/239c336eaa9b3db660c7c1115b04f3dcb9139743 @fnueske I check against the complex conjugate in case the sign structure is different - could you please check that this approach is also correct?
That should do it. Are the tests passing now?
yes they are.
With recent versions of NumPy/Scipy (1.15 / 1.0.0) one observes failing tests in variational/tests/solvers/tests/test_direct.py like this:
Although in this unit test there is a utility function to sort the eigenvalues by sign and magnitude.
@fnueske Do you think this is an issue with reference solution obtained from SciPy? If so, do you think it is save to ignore the sign of the imaginary value, as it seems only these signs differ.