Solve machine learning Question 6: Linear regression with numpy…
Question Answered step-by-step Solve machine learning Question 6: Linear regression with numpy… Solve machine learning Question 6: Linear regression with numpy 1-liners# here we initialize a random data matrix X and random numerical labels yimport numpy as npX = np.random.randn(10,3)y = np.random.randn(10,1)# we also initialize a hypothetical hyperplane defined by w and bw = np.random.randn(1,3)b = -1# (i) find the numerical labels predicted by the model (w,b) for the points in X# your code should be a single numpy line# hint: we wrote this equation for a single point x in class# try to generalize it by expressing everying in terms of matrices# your code goes here# y_predicted =# (ii) find the updated weights after one application of gradient descent with lr = 0.1# your code should be a single numpy liney_ = np.random.randn(10,1) Computer Science Engineering & Technology Python Programming CS 675 Share QuestionEmailCopy link Comments (0)


