Session Ready
Exercise

Minimizing a loss function

In this exercise you'll implement linear regression "from scratch" using scipy.optimize.minimize.

We'll train a model on the Boston housing price data set, which is already loaded into the variables X and y. For simplicity, we won't include an intercept in our regression model.

Instructions
100 XP
  • Fill in the loss function for least squares linear regression.
  • Print out the coefficients from fitting sklearn's LinearRegression.