Implementing gradient descent (GD) in Python
3 min readJan 15, 2022
There are tons of articles to implement gradient descent in python however I wanted to do it in the simplest way possible with minimum coding and still covering all the concepts. We still need to train and test data with usual jargon however I’ am trying to keep the coding and the maths simple.
import numpy as npX = np.array([1,2,3,4])
y = 2*X
x_test = 5…