# Sparse features > A feature whose values are predominately zero or empty. For example, a feature containing a single 1 value and a million 0 values is sparse. In contrast, a dense feature has values that are predominantly not zero or empty.[^1] A [feature](https://wiki.g15e.com/pages/Feature%20(machine%20learning.txt)) whose values are predominately zero or empty. For example, a feature containing a single 1 value and a million 0 values is sparse. In contrast, a [dense feature](https://wiki.g15e.com/pages/Dense%20feature.txt) has values that are predominantly not zero or empty.[^1] In [machine learning](https://wiki.g15e.com/pages/Machine%20learning.txt), a surprising number of features are sparse features. Categorical features are usually sparse features. For example, of the 300 possible tree species in a forest, a single example might identify just a *maple tree*. Or, of the millions of possible videos in a video library, a single example might identify just "Casablanca."[^1] In a model, you typically represent sparse features with [one-hot encoding](https://wiki.g15e.com/pages/One-hot%20encoding.txt). If the one-hot encoding is big, you might put an [embedding layer](https://wiki.g15e.com/pages/Embedding%20layer.txt) on top of the one-hot encoding for greater efficiency.[^1] ## Footnotes [^1]: https://developers.google.com/machine-learning/glossary#sparse_features