Question: Programming tasks Q2) Use make_regression function in skearn to generate dataset with 500 samples with 3 features (X1, X2, X3) with random_state = 10. The
Programming tasks Q2) Use make_regression function in skearn to generate dataset with 500 samples with 3 features (X1, X2, X3) with random_state = 10. The hypothesis is defined as follows: h(x) = 30x7 + 0,x - 6gx3+ 0,02x + 6 a. Split the dataset into 60% train data and 40% test data. b. Write a program in two different ways using Python and PyTorch to implement linear regression using gradient decent based. The loss function is defined as follows: 16., 01,82,83) = (he(x(0) - y0)2 2m C. Plot the cost/loss function against the iterations (epochs)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
