Update to LOESS algorithm

Changes to loess regression algorithm