Calculate derivatives of gauges using simple linear regression, similar to deriv and predict_linear.
This likely requires multiple passes over the values in every bucket, first to calculate the mean values and then to apply the formula for simple linear regression.