AIExplainer
Machine Learning Mathematics Intermediate 1 min read

What is a sparsity?

The number of elements set to zero (or null) in a vector or matrix divided by the total number of entries in that vector or matrix.

The number of elements set to zero (or null) in a vector or matrix divided by the total number of entries in that vector or matrix. For example, consider a 100-element matrix in which 98 cells contain zero. The calculation of sparsity is as follows:

Feature sparsity refers to the sparsity of a feature vector; model sparsity refers to the sparsity of the model weights.

Practitioners refer to sparsity when building, training, or evaluating machine learning systems. It appears in research papers, product documentation, and technical discussions about AI capabilities and limitations.