frobenius_error()#
- frobenius_error(Qtrue, Qapprox)[source]#
Compute the absolute and relative Frobenius-norm errors between the snapshot sets Qtrue and Qapprox, where Qapprox approximates Qtrue:
absolute_error = ||Qtrue - Qapprox||_F, relative_error = ||Qtrue - Qapprox||_F / ||Qtrue||_F.
- Parameters:
- Qtrue(n, k)
“True” data. Each column is one snapshot, i.e., Qtrue[:, j] is the data at some time t[j].
- Qapprox(n, k)
An approximation to Qtrue, i.e., Qapprox[:, j] approximates Qtrue[:, j] and corresponds to some time t[j].
- Returns:
- abs_errfloat
Absolute error ||Qtrue - Qapprox||_F.
- rel_errfloat
Relative error ||Qtrue - Qapprox||_F / ||Qtrue||_F.