# Can we use Gradient Descent in the place of Ridge Regression in overfitting problem while doing linear regression problem?

What is the difference between Gradient Descent and Ridge regression?

We use ridge regression for overfitting problem when the Mean Squared Error for test dataset is high. I think that we can use gradient descent instead of ridge regression by using it on test dataset. This way we can the slope and intercept which has has the least MSE. Thus we can get the best fit line like this.