$30
1. Your task is to find a linear approximation of the function 1 + x, x ∈ [0,1]. Your homework should contain the following steps:
a) Generate N = 10000 random numbers from [0,1]:
x1,x2,...,xN ∈ [0,1],
√
and then obtain their labels: yi = 1 + xi, i = 1,2,...,N.
b) Do linear regression on your generated data using the closed formsolution.
c) Do linear regression on your generated data using the library sklearn.
d) Do linear regression on your generated data implementing the gradi-ent descent algorithm by yourself. e*) Do linear regression on your generated data using tensorflow.
f) Sketch the graphs of all approximations on one graph.
g) Compare all solutions with the first degree Taylor approximation of√
the function 1 + x.
2*. a) How will you define polynomial regression inspired from linear regression?
b) Can you implement the polynomial regression using linear regression?