Slope Intercept Form with Gradient Descent

posted Originally published at dev.to 2 min read

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.

Slope-Intercept Form equation

A residual is the difference between the actual y value and the predicted y value.

Residule = (Actual Y - Predicted Y)

Finally, the residual is squared, and the sum of all the residuals is calculated, which is called the Mean Squared Error (MSE).

(Residual)^2 is nothing but the vertical distance between the predicted line and the actual data points, squared.

The lesser the value, the greater the accuracy.

Using this Mean Squared Error (MSE), we can adjust the slope and y-intercept to minimize the error.

Conclusion

Will discuss Gradient Descent in the next part.

git-lrc

Any feedback or contributors are welcome! It’s online, source-available, and ready for anyone to use.

Star git-lrc on GitHub
Slope Intercept Form with Gradient Descent

More Posts

Why Email-Only Contact Forms Are Failing in 2026 (And What Developers Should Do Instead)

JayCode - Mar 2

Understanding Systemd.exec - Part 2: Solving Postgres Vulnerability.

Ganesh Kumar - May 3

Understanding Systemd.exec—Part 3: Disabling the COPY TO PROGRAM feature in Postgres.

Ganesh Kumar - May 2

Attention Is All You Need - Part 1

Ganesh Kumar - Apr 29

Attention Is All You Need - Part 2

Ganesh Kumar - Apr 29
chevron_left

Related Jobs

Commenters (This Week)

1 comment
1 comment
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!