Linear regression model, one variable Finding the line that best fits the data h(x) = ax + b h(x) = 1.3x - 18

Draw a function graph X = np.linspace(-2, 2, 100) ax.plot(X, X**2, label='f(x) = x**2')

1. Initialize params for the model 2. Compute the cost function 3. Compute the gradients 4. Update params, using a learning rate 5. Repeat steps 2-4

Instant speed, limit of average speeds Derivative, rate of change of y with respect to x f(x) = ax^2 f'(x) = 2ax

1. Load training data 2. Choose a line for model 3. Compute errors sum 4. Minimize error 5. Make predictions