Dimensionality reduction
Dimensionality reduction is a set of techniques that describe data with fewer variables while keeping as much of its meaningful structure as possible, making it easier to model, store or plot.
Every variable in a dataset counts as a dimension. A customer record might have hundreds, an image thousands of pixel values, and a text embedding hundreds or thousands of numbers. Data with many dimensions is expensive to process, and because the points end up spread thinly across a vast space, many methods work badly on it, a problem known as the curse of dimensionality. Dimensionality reduction maps the data into fewer dimensions while trying to keep what matters.
There are two broad approaches. Feature selection keeps a subset of the original variables and drops the rest. Feature projection, also called feature extraction, builds a smaller set of new variables, each a combination of the old ones. Projection can be linear or non-linear.
The classic linear method is principal component analysis (PCA), invented by Karl Pearson in 1901 and developed independently and named by Harold Hotelling in the 1930s. It finds the directions in which the data varies most, each at right angles to the previous ones, and keeps only the first few. If a survey's 50 questions largely measure two underlying attitudes, the first two components can capture most of the variation in the answers.
Non-linear methods include t-SNE and UMAP, which was introduced by Leland McInnes, John Healy and James Melville in 2018 and which its authors say is competitive with t-SNE for visualisation while running faster. These are widely used to draw two-dimensional maps of high-dimensional data such as embeddings. Such maps need careful reading. t-SNE is not recommended for clustering or outlier detection, and the UMAP authors argue that their method keeps more of the data's global structure than t-SNE does. Autoencoders, neural networks with a narrow middle layer, learn their own compressed representations.
In practice dimensionality reduction is used to remove noise, to compress data, to make plots of complex data and as a step before other methods. The scikit-learn documentation, for example, suggests running PCA before k-means clustering on high-dimensional data. The cost is information: something is always lost, and the new combined variables can be hard to interpret.
It is used to speed up and improve other methods on high-dimensional data, to remove noise, to compress data and to visualise complex data in two or three dimensions. It is common as a preprocessing step before clustering or classification. PCA is a linear method that keeps the directions in which the data varies most. t-SNE is a non-linear method designed mainly for visualisation and is not recommended for clustering or outlier detection. PCA is often used for preprocessing, t-SNE for plots. It is the set of problems that arise as the number of dimensions grows: data points become sparse, distances between them inflate and computation becomes more expensive. Many methods that work well in a few dimensions degrade in hundreds or thousands. Feature selection is one kind of dimensionality reduction: it keeps some original variables and drops others. The other kind, feature projection, creates new variables that combine the originals, as PCA does.Common questions
What is dimensionality reduction used for?
What is the difference between PCA and t-SNE?
What is the curse of dimensionality?
Is dimensionality reduction the same as feature selection?
Search for "dimensionality reduction", "principal component analysis", "t-SNE" or "UMAP". Library documentation such as scikit-learn's guides, statistics textbooks and the original papers on arXiv explain the methods and their limits. Be careful with conclusions drawn from a single two-dimensional plot of high-dimensional data, since the picture can change with the method and its settings.Finding more
Working out what this means for your business?
Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.