Suppose you want to fit a linear regression model that
X=⎝⎛1111311042027543⎠⎞, y=⎝⎛0245⎠⎞
Your task is to create model and predict the amount of tips for an order with the following feature vector:
x=(1, 2, 1, 3).
The input as numpy arrays
X = np.array([[1, 3, 4, 7], [1, 1, 2, 5], [1, 1, 0, 4], [1, 0, 2, 3]])
x = np.array([1, 2, 1, 3])
y = np.array([0, 2, 4, 5])