Added function to compute mahalanobis distance of dataset