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
I have noted a small issue with the rank selection in _compute_svd(X, svd_rank) when user prescribes a desired cumulative energy (i.e. a truncation error). Line 242 of dmdbase.py, the code reads
cumulative_energy = np.cumsum(s / s.sum())
However, the energy in POD analysis is related to the square of the singular values, not the singular values themselves. The code should instead read
Hi guys,
I have noted a small issue with the rank selection in
_compute_svd(X, svd_rank)
when user prescribes a desired cumulative energy (i.e. a truncation error). Line 242 ofdmdbase.py
, the code readscumulative_energy = np.cumsum(s / s.sum())
However, the energy in POD analysis is related to the square of the singular values, not the singular values themselves. The code should instead read
cumulative_energy = np.cumsum( s**2 / (s**2).sum() )
This is pretty straightforward to modify so should I send a PR or do you guys wanna handle it?
The text was updated successfully, but these errors were encountered: