Formula for linear regression coefficient calculation

I just explored the website for MLE coding interview which implement the linear regression classifier and the fit function applied the

slope = SSxy / SSxx
intercept = y_mean - slope * x_mean

Want to know if this is required for professional requirement? Why this is not covered in the course?

Because that’s not a regression method, and it doesn’t work if there are multiple features. And it isn’t practical if the data set is very large.

I see that it doesn’t work in multi linear model, can you provide more detail about in since you said that it’s not a regression method?

Sorry, what I had in mind by “regression method” was the classic machine learning technique of linear regression, which is an iterative method based on adjusting the weights based on the gradients of the cost function.

This method is computationally easy and scales well to very large data sets.

Well is that required if want to pursue in professional position, like for coding assessment for ML/DS? Or the course provided sample code of assignment or ungraded lab is enough for the challenge?

The code you provided is never used in machine learning.

1 Like