FAQ: Linear Regression - Learning Rate

This community-built FAQ covers the “Learning Rate” exercise from the lesson “Linear Regression”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Data Science

Machine Learning

FAQs on the exercise Learning Rate

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

There’s a bug in Chapter 9 - Linear Regression. It says " We have imported two new lists representing how the b value changed with different learning rates:"…
bs_000000001 and bs_01 – but neither is imported or can be imported into the exercise.

1 Like

We derived the gradients of intercept and loss using calculus. So the resulting formulas will return 0 for the minimum and therefore the best b (intercept) or m (slope).

So wouldn’t be the optimal way for finding the best b / m to just solve the equations? Equation for m:

0 = 2/N * SUM(-x_i * (y_i * - (m * x_i + b)), i=1, N)

Now resolve m. I didn’t try it, but I think it should be possible to solve the equation and then you have a general formula for finding b / m.