As when we made the function getW() we passed query_point as single value that what is substitued in small x but in this predict we are making qx =np.mat([query_x,1]
). when this value will go to the getW () function , How it is getting the value from the matrix as it is now in matrix in small x of the getW().
Doubt on query_point
hey @YashSINGHAI,
if you check the getW() function , there we are iterating over a matrix only.
So, we need to convert our scaler value query_x into a mat by adding another 1.
So, that we can easily and perfectly compute our target value by y = theta0x0 + theta1x1 .
I hope this helped you.
THank You
.