Keep the label column as a separate exact vector.

highlighted = computed this step

Read the y column separately

The y values are 5, 4, and 8.

y=[548]y=\begin{bmatrix}5\\4\\8\end{bmatrix}
Feature Matrix ExactlyExact rows rewritten into X, y, and intercept X plus.rows to X, y, and intercept X plusrow idx1x2yX rowy entryX+ rowA125[1,2]5[1,1,2]B214[2,1]4[1,2,1]C338[3,3]8[1,3,3]feature order: x1, x2; row ids stay outside Xintercept column is all ones in X+feature matrix is a table rewrite from displayed rowsrow IDs stay outside X; intercept column is all onesNOT training; NOT learning; NOT predictionNOT accuracy; NOT generalization; NOT feature importanceNOT best features; NOT causal; NOT probability truth

Keep the same row order

The y vector follows row order A, B, C, matching the rows of X.

row order: A,B,C\text{row order: } A,B,C
Feature Matrix ExactlyExact rows rewritten into X, y, and intercept X plus.rows to X, y, and intercept X plusrow idx1x2yX rowy entryX+ rowA125[1,2]5[1,1,2]B214[2,1]4[1,2,1]C338[3,3]8[1,3,3]feature order: x1, x2; row ids stay outside Xintercept column is all ones in X+feature matrix is a table rewrite from displayed rowsrow IDs stay outside X; intercept column is all onesNOT training; NOT learning; NOT predictionNOT accuracy; NOT generalization; NOT feature importanceNOT best features; NOT causal; NOT probability truth

This is still only a table rewrite

Putting y beside X does not fit a model. It only separates feature cells from label cells.

feature cells and label cells stay separate\text{feature cells and label cells stay separate}
Feature Matrix ExactlyExact rows rewritten into X, y, and intercept X plus.rows to X, y, and intercept X plusrow idx1x2yX rowy entryX+ rowA125[1,2]5[1,1,2]B214[2,1]4[1,2,1]C338[3,3]8[1,3,3]feature order: x1, x2; row ids stay outside Xintercept column is all ones in X+feature matrix is a table rewrite from displayed rowsrow IDs stay outside X; intercept column is all onesNOT training; NOT learning; NOT predictionNOT accuracy; NOT generalization; NOT feature importanceNOT best features; NOT causal; NOT probability truth