Computes the mean relative error by normalizing with the given values.

The mean_relative_error function creates two local variables, total and count that are used to compute the mean relative absolute error. This average is weighted by weights, and it is ultimately returned as mean_relative_error: an idempotent operation that simply divides total by count.

For estimation of the metric over a stream