docs: def _compute_fval(X, A, R, P, Z, lmbdaA, lmbdaR, lmbdaZ, normX):
      """Compute fit for full slices"""
      f = lmbdaA * norm(A) ** 2
      for i in range(len(X)):
          ARAt = dot(A, dot(R[i], A.T))
          f += (norm(X[i] - ARAt) ** 2) / normX[i] + lmbdaR * norm(R[i]) ** 2
      return f