Updates to linear regression

End to end tested and working