brainmass.objectives.timeseries_rmse#
- brainmass.objectives.timeseries_rmse()[source]#
Build a root-mean-square-error loss between two time series.
- Returns:
loss(prediction, target) -> scalarcomputingsqrt(mean((prediction - target) ** 2)). The subtraction is unit-checked: incompatible units raise before the magnitude is taken.- Return type:
callable
See also
fc_rmseRMSE between functional-connectivity matrices.
Examples
>>> import jax.numpy as jnp >>> from brainmass import objectives >>> loss = objectives.timeseries_rmse() >>> x = jnp.zeros((10, 3)) >>> float(loss(x + 2.0, x)) 2.0