Dictionary of Applied Machine Learning: 151 machine-learning terms, each with a definition, a figure, citations and a Python demo · All terms · Demos · Start here
Updated on 2026-11-26
Readiness 100/100
See also feature feature space feature transformation data point feature matrix feature learning dimensionality reduction tabular data weighted graph Laplacian matrix eigenvector spectral clustering kernel method Hilbert space
A feature vector is a list of numbers describing a data point, with one entry for each of its features. A feature is an attribute of the data point that is measured or computed without substantial human supervision. The precise specification of these measurements defines a feature transformation, the function that maps the data point to its feature vector that belongs to an underlying feature space. The feature space is usually a Euclidean space whose dimension is the number of features. Nonnumeric features are encoded as numbers, a binary attribute as $0$ or $1$ and a categorical one by one-hot encoding. The domain of the feature transformation varies between applications: a data point can be a record of attributes, a text, a digital image, an audio recording, or a node of a graph, whose feature vector collects entries of the eigenvectors of the Laplacian matrix. More generally, the feature space can be any Hilbert space, and a kernel method uses such feature vectors without ever forming them, through their inner products alone.

featurevec.py, which recomputes what the entry states: the script block by block · open in ColabB-dayA machine learning (ML) method can represent a day at Krems an der Donau (Austria) by four numbers. They are the air temperature at $06{:}00$ and at $15{:}00$ (UTC) of that day, and the same two readings of the previous day. For 16 July 2024, these are $24.6$ and $30.8\,^{\circ}\mathrm{C}$, and $22.2$ and $31.5\,^{\circ}\mathrm{C}$ the day before. Stacking these measurements into a vector $\big(24.6, 30.8, 22.2, 31.5\big)^{\top} \in \mathbb{R}^{4}$ gives a feature vector that characterizes this day.
In general, the entries of a feature vector ${\mathbf x} = \big(x_{1}, \ldots, x_{d}\big)^{\top}$
are the features $x_{1}, \ldots, x_{d}$ of a data point:
attributes measured or computed without substantial human supervision (Duda et al., 2001).
A precise specification of how these attributes are measured defines a feature transformation
\[
{\mathbf \Phi} : \mathcal{Z} \rightarrow \mathcal{X}, \quad {\mathbf x} = {\mathbf \Phi}({\mathbf z}) \text{.}
\]
The function ${\mathbf \Phi}$ maps a data point ${\mathbf z} \in
\mathcal{Z}$ to its feature vector ${\mathbf x}$ in the feature space $\mathcal{X}$ (Fig. 1).
Feature extraction, a preprocessing step, computes ${\mathbf \Phi}({\mathbf z})$ for a given
data point (Bishop, 2006, p. 2). In supervised learning, the extracted feature vector is
fed into a hypothesis $h: \mathcal{X} \rightarrow \mathcal{Y}$ that delivers a
prediction $\widehat{y} = h({\mathbf x})$ of the label $y \in \mathcal{Y}$
of the data point. The feature vectors ${\mathbf x}^{(1)}, \ldots, {\mathbf x}^{(m)}$ of the
data points in a dataset $\mathcal{D}$ of dataset size $m$ are the rows of its
feature matrix ${\mathbf X} \in \mathbb{R}^{m \times d}$.
B-encodeNonnumeric features can also be entries of a feature vector, once their values are encoded as real numbers (Goodfellow et al., 2016; Hastie et al., 2009). A binary feature, such as whether there was rainfall during the day, is encoded as $0$ or $1$. A categorical feature with $K$ possible values, such as the season (winter, spring, summer, or autumn), is one-hot encoded. It occupies $K$ entries of the feature vector, all equal to $0$ except for a single entry equal to $1$, whose position names the value. On 16 July 2024, $18.7$ millimeters of rain fell, and the season is summer, so the two features are encoded as the entries $1$ and $\big(0, 0, 1, 0\big)$, respectively. Stacked under the four temperatures, they give the feature vector ${\mathbf x} = \big(24.6, 30.8, 22.2, 31.5, 1, 0, 0, 1, 0\big)^{\top} \in \mathbb{R}^{9}$ of the day. Records that mix numeric and nonnumeric attributes in this way, one row per data point, are tabular data.
B-imageWhile the range of the feature transformation ${\mathbf \Phi}$ can often be chosen as
$\mathbb{R}^{d}$, its domain $\mathcal{Z}$ varies widely among ML applications.
For example, each element of $\mathcal{Z}$ can be a text document, with its feature vector
consisting of word occurrence counts or of an average of the word embeddings of its
words. In computer vision, the elements of $\mathcal{Z}$ are digital images, each an array of pixels. The feature vector then lists the red-green-blue (RGB)
intensities of those pixels, one entry per intensity (Fig. 2). The
feature vector of an audio recording typically consists of signal values at a sequence
of time instants, one entry $x_{j}$ for each instant
$j=1,\ldots,d$ (Fig. 3), or of the entries of its
spectrogram. Instead of fixing ${\mathbf \Phi}$ by hand, deep learning methods learn it from
data: the layers of a deep net up to the last one compute a feature vector, and the
last layer is the hypothesis applied to it (feature learning; Goodfellow et al., 2016, Ch. 15).
B-dimsThe notion of a Euclidean feature vector can be generalized by replacing the feature space $\mathbb{R}^{d}$ with an arbitrary Hilbert space $\mathcal{H}$. Here, a feature vector is the image of a feature transformation \[ {\mathbf \Phi} : \mathcal{Z} \rightarrow \mathcal{H} \text{,} \] and any Hilbert space can serve as the feature space (Shalev-Shwartz and Ben-David, 2014, Sect. 16.1). One construction of such a feature vector uses a kernel $k: \mathbb{R}^{d} \times \mathbb{R}^{d} \rightarrow \mathbb{R}$. The kernel assigns to each ${\mathbf z} \in \mathbb{R}^{d}$ the function $k\big({\mathbf z},\cdot\big): \mathbb{R}^{d} \rightarrow \mathbb{R}$, whose value at ${\mathbf z}' \in \mathbb{R}^{d}$ is $k\big({\mathbf z},{\mathbf z}'\big)$. That function is itself a vector in a reproducing kernel Hilbert space (RKHS) $\mathcal{H}$, a Hilbert space whose elements are functions on $\mathbb{R}^{d}$ (Aronszajn, 1950, Part I, Sect. 2; Schölkopf and Smola, 2002, Sect. 2.2.2). A kernel method, such as the support vector machine (SVM), kernel ridge regression, or a Gaussian process (GP), uses elements of $\mathcal{H}$ as feature vectors without ever forming them explicitly. Many ML methods use feature vectors only through their inner products, which the reproducing property reduces to kernel evaluations, $\langle k\big({\mathbf z},\cdot\big), k\big({\mathbf z}',\cdot\big) \rangle_{\mathcal{H}} = k\big({\mathbf z},{\mathbf z}'\big)$ (Schölkopf and Smola, 2002, Eq. (2.30)).
Synonyms: covariate vector, input vector, predictor vector.
See also: feature, feature space, feature transformation, data point, vector, Euclidean space, feature matrix, input vector, preprocessing, feature learning, dimensionality reduction, tabular data, graph, weighted graph, similarity graph, Laplacian matrix, eigenvector, embedding, spectral clustering, kernel, reproducing kernel Hilbert space, kernel method, Hilbert space.
@misc{dictml_featurevec,
author = {Jung, Alexander},
editor = {Olioumtsevits, Konstantina and Schnoor, Ekkehard},
title = {feature vector},
howpublished = {Dictionary of Applied Machine Learning (course edition)},
year = {2026},
doi = {10.5281/zenodo.21569296},
note = {ISBN 978-952-64-3013-3, CC BY 4.0, retrieved 2026-11-26},
url = {https://dictionaryofml.org/terms/featurevec.html}
}