Skip to content

Glossary: ML Beyond the Basics

Sparse matrix

A matrix that stores only its nonzero values, which saves memory when most entries are 0, as in one-hot encoded columns. It can be converted to an ordinary dense array with `.toarray()`.

Where the book teaches it

Related terms

One-hot encoding