Data Science, Linear Regression, Machine Learning, Python, Numpy.
""" loss = np.sum(np.power((yhat - y), 2)) / self.m return loss def gradient_desc(self, betas, X, y, yhat): """ Method that takes in the current values of betas, X, y, and yhat, calculates the gradient of the loss function with respect to betas, and updates the values of betas using gradient