Menu

Post image 1
Post image 2
Post image 3
1 / 3
0

From Linear Regression to Gradient Descent

DEV Community·Ganesh Kumar·3 months ago
#HnRDoGvp
Reading 0:00
15s threshold

Hello, I'm Ganesh. I'm building git-lrc , an AI code reviewer that runs on every commit. It is free, unlimited, and source-available on Github. Star git-lrc on GitHub to help more developers discover the project. Do give it a try and share your feedback for improving the product. In the previous section, we learned that linear regression finds the best-fitting line by determining the optimal slope and intercept. In this article, we will discuss how to calculate the optimal slope and intercept using Gradient Descent. How to calculate the optimal slope and intercept using Gradient Descent The quality of that line is measured using the Sum of Squared Residuals (SSR), which represents the total prediction error. SSR = sum( (y_observed - y_predicted)^2 ) Enter fullscreen mode Exit fullscreen mode The best regression line is simply the line that produces the smallest SSR. When studying linear regression, it's easy to think that the slope and intercept magically appear from a formula.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More