Creating the model

Report a typo

Suppose you want to fit a linear regression model that

X=(1347112511041023), y=(0245)X = \begin{pmatrix} 1 & 3 & 4 & 7 \\ 1 & 1 & 2 & 5 \\ 1 & 1 & 0 & 4 \\ 1 & 0 & 2 & 3 \end{pmatrix}, \ \overrightarrow{\bf{y}} = \begin{pmatrix} 0 \\ 2 \\ 4 \\ 5 \end{pmatrix}

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)\overrightarrow{\bf{x}} = \begin{pmatrix} 1, \ 2, \ 1, \ 3 \end{pmatrix}.

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])

Enter a number
___

Create a free account to access the full topic