plot_residual_energy()#
- PODBasis.plot_residual_energy(threshold=None, right=None, ax=None, **options)[source]#
Plot the residual singular value energy.
The residual energy of \(r\) singular values is defined by
\[\epsilon_r = \sum_{i=r+1}^k\sigma_i^2 \bigg/ \sum_{j=1}^k\sigma_j^2 = 1 - \left( \sum_{i=1}^r\sigma_i^2 \bigg/ \sum_{j=1}^k\sigma_j^2 \right)\]This method plots \(\epsilon_r\) as a function of \(r\).
- Parameters
- thresholdfloat or list[floats] or None
Cutoff value(s) to mark on the plot.
- rightint or None
Maximum singular value index to plot (
plt.xlim(right=right)
).- axplt.Axes or None
Matplotlib Axes to plot on. If
None
(default), a new single-axes figure is created.- optionsdict
Additional arguments to pass to
plt.semilogy()
.
- Returns
- axplt.Axes
Matplotlib Axes for the plot.