Maths for ML / Notation

A×BA \times B

Cartesian product

SetsIntermediate

Say it “A cross B”

All ordered pairs with the first from A and the second from B.

Example

X×Y\mathcal{X} \times \mathcal{Y}

All possible (input, label) pairs.

In code

itertools.product(A, B)

Where you’ll see it in ML

A dataset is a sample from 𝒳 × 𝒴. Also why matrix shapes are written m × n.

Don’t confuse it with

← All 94 symbols