linearRegression function

Run a linear regression with optional ridge regression