Conversation
This is needed for JuliaDiff/ChainRules.jl#431.
|
@sethaxen Is this strong enough for the eigen tests in ChainRules? Or do we actually want to require the eigenvectors to be approximately equal as well? |
| # Comparing eigen factoriztions is tricky, because the order and normalization of eigen | ||
| # vectors is not unique. Therefore we just calculate the original matrix and compare that | ||
| # instead. | ||
| function test_approx(actual::Eigen, expected::Eigen, msg=""; kwargs...) |
There was a problem hiding this comment.
I wonder if we should do this for all subtypes of Factorization ?
There was a problem hiding this comment.
Hm, yes, maybe? Although I am not really familiar with those, so perhaps we should wait until an actual use case comes up?
|
I will let @sethaxen give final approval on this, as I don;t know how things work with |
|
This is to be used to test that the primal part of |
|
Hmm, yes you might be right. Looking at the failures in https://github.com/JuliaDiff/ChainRules.jl/runs/2769420821?check_suite_focus=true#step:6:282 for example again, it looks like the values shown do actually match precisely, any ideas what could cause this? There shouldn't be any NaN's occuring in those tests, right? Even if there would be degeneracy, that shouldn't cause the results to be non-deterministic no? I can look into this some more if you don't have any ideas either. |
I'm not certain. But I do see some |
|
I only see that for the arrays with 0 elements, but I could be wrong. |
|
Ah, wait! It seems like |
This is needed for JuliaDiff/ChainRules.jl#431.