Primarily changes for gradient calculations in PLSTwo.