Expand description
Checks that a set of measurements looks like a linear function rather than like a quadratic function. Algorithm:
- Linearly scale input to be in [0; 1)
- Using linear regression, compute the best linear function approximating the input.
- Compute RMSE and maximal absolute error.
- Check that errors are within tolerances and that the constant term is not too negative.
Ideally, we should use a proper “model selection” to directly compare quadratic and linear models, but that sounds rather complicated:
We might get false positives on a VM, but never false negatives. So, if the first round fails, we repeat the ordeal three more times and fail only if every time there’s a fault.