Learn Before
Formula

Linear Regression Design Matrix Notation

When predicting labels for an entire dataset consisting of nn examples, it is mathematically convenient to organize the features into a design matrix XRnimesd\mathbf{X} \in \mathbb{R}^{n imes d}, where each row represents an example and each column a feature. The vector of predictions y^Rn\hat{\mathbf{y}} \in \mathbb{R}^n for all examples can then be concisely computed using a matrix-vector product with the weight vector w\mathbf{w}, adding the bias term bb via broadcasting: y^=Xw+b\hat{\mathbf{y}} = \mathbf{X} \mathbf{w} + b.

0

1

Updated 2026-05-02

Contributors are:

Who are from:

Tags

D2L

Dive into Deep Learning @ D2L