a=np.array([1,2,3]) this is matrix of (3,) i mean should i always consider this as a column vector b=np.array([[1],[2],[3]]) and the dimension of this matrix is (3,1) what should i consider this as a column vector again plzz help with this as this is very important when i am working with vectorized implementation of the ML algorithms Describe in detail
Regarding dimension of the matrix
Hey @amankharb, a = np.array([1,2,3]) is a numpy vector, and np.array([[1],[2],[3]]) is a numpy array.
Here the difference is that generally vectors are 1D like a single x axis. where as numpy arrays, like np.array([[1],[2],[3]]) are 2D. The difference is of the dimensions only.
Hope this resolved your doubt.
Plz mark the doubt as resolved in my doubts section.
so when we initialize theta parameters in ML algorithms.We should initialize in a numpy vector of dimensions(n,) or as a numpy array with dimension(n,1)
Hey @amankharb, it depends on your choice and implementation completely. I have tried it with both of them and you can as well. Its completely your call. There are only very subtle changes required.
Hope this resolved your doubt.
Plz mark the doubt as resolved in my doubts section.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.