least squares hyperplane fitting