Update regression.js

Linear Regression function returns an object, not an array. Previously, it was returning NaN for "y"
My mistake, there was another function with same name overwriting the original in my project.