FunctionalVARResult.reconstruction_rmse#

property FunctionalVARResult.reconstruction_rmse: float[source]#

Root-mean-square projection error over all curves and grid points.

The floor for everything downstream: no forecast or fitted value can be closer to the data than the basis allows the data to be to itself.

Example

>>> import numpy as np
>>> rng = np.random.default_rng(0)
>>> grid = np.linspace(0.0, 1.0, 25)
>>> curves = 0.1 * np.cumsum(rng.standard_normal(80))[:, None] + np.sin(np.pi * grid)
>>> curves = curves + 0.01 * rng.standard_normal((80, 25))
>>> res = FunctionalVAR(curves, grid, order=1, basis="fpca", n_components=1).fit()
>>> floor = res.reconstruction_rmse
>>> one_step = np.sqrt(np.mean((curves[1:] - res.fitted_curves()) ** 2))
>>> bool(floor < 0.02), bool(one_step > floor)
(True, True)