forked from arturs-berzins/sniROM
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path99_plot_POD.py
More file actions
32 lines (25 loc) · 1.08 KB
/
99_plot_POD.py
File metadata and controls
32 lines (25 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
"""
Plot squared aggregate standardized projection error over number of bases L.
Observe, how rapidly the error decreases over L. Compare, how close the
behaviour of the other datasets is. Dissimilar behaviour- the datasets do not
cover the sample space well enough i.e. can be seen as not from the same
distribution. See Eq. (17), (22)-(24) in paper.
"""
# Author: Arturs Berzins <berzins@cats.rwth-aachen.de>
# License: BSD 3 clause
import config
import utils
from matplotlib import pyplot
fig, axes = pyplot.subplots(1,len(config.components))
fig.suptitle('Squared projection loss over number of basis functions')
for idx_ax, component in enumerate(config.components):
L = config.num_basis[component]
for dataset in config.datasets:
eps_pod_sq = utils.load_error_POD_sq(dataset, component, L='all')
axes[idx_ax].plot(eps_pod_sq.mean(axis=1)**1, label=f'{dataset}')
axes[idx_ax].set_yscale('log')
axes[idx_ax].set_xlabel('L')
axes[idx_ax].legend()
axes[0].set_ylabel(r'$\varepsilon^2_{POD}$')
fig.set_size_inches(w=6.3, h=4.0)
pyplot.show()