Here why it is necessary to create a column vector X instead of just using the row vector or numpy array x directly?
Hi @flyunicorn,
Here in this function run_gradient_descent_feng(), X is training data which can be multi dimensional i.e., can have more than one column unlike this simple x used in this example. So, it is necessary that your vector is 2 dimensional although it is (20,1) in this case else (20, ) won’t work. Also for matrix multiplication it is necessary for dimensions to be satisfied like here for X@model_w matrix multiplication will only work if X is of dimension (n,1).