What does the input data look like here? Is it standardized?
Also, we have a built-in Linear mean function already, so no need to code your own.
Just for fun, try using half-normals instead of taking the absolute values of a normal (then add your offsets). Probably not the issue, but can’t hurt.