Linear regression

Step 4 of 21 in Machine Learning · Build · Easy

Fit a weighted sum of features to minimize squared error. Solve exactly with the normal equation or iteratively with gradient descent.

Build it

  1. Two ways

    Fit California housing with the normal equation and with your gradient descent.

    Done when: Both match sklearn LinearRegression to 1e-4.

Resources

Earn this star

On the map, you log what you built. Finish the step and its star lights.

Open this step on the map