DimensionReduce
✖
DimensionReduce
projects the examples examplei to a lower-dimensional approximating manifold.
Details and Options



- DimensionReduce can be used on many types of data, including numerical, textual, sounds, and images, as well as combinations of these.
- Each examplei can be a single data element, a list of data elements, an association of data elements, or a Dataset object.
- DimensionReduce[examples] automatically chooses an appropriate dimension for the approximating manifold.
- DimensionReduce[examples] is equivalent to DimensionReduce[examples,Automatic].
- The following options can be given:
-
FeatureExtractor Identity how to extract features from which to learn FeatureNames Automatic names to assign to elements of the examplei FeatureTypes Automatic feature types to assume for elements of the examplei Method Automatic which reduction algorithm to use PerformanceGoal Automatic aspect of performance to optimize RandomSeeding 1234 what seeding of pseudorandom generators should be done internally TargetDevice "CPU" the target device on which to perform training - Possible settings for PerformanceGoal include:
-
"Quality" maximize reduction quality "Speed" maximize reduction speed - Possible settings for Method include:
-
Automatic automatically chosen method "Autoencoder" use a trainable autoencoder "Hadamard" project data using a Hadamard matrix "Isomap" isometric mapping "LatentSemanticAnalysis" latent semantic analysis method "Linear" automatically choose the best linear method "LLE" locally linear embedding "MultidimensionalScaling" metric multidimensional scaling "PrincipalComponentsAnalysis" principal components analysis method "TSNE" -distributed stochastic neighbor embedding algorithm
"UMAP" uniform manifold approximation and projection - For Method"TSNE", the following suboptions are supported:
-
"Perplexity" Automatic perplexity value to be used "LinearPrereduction" False whether to perform a light linear pre-reduction before running the t-SNE algorithm - Possible settings for RandomSeeding include:
-
Automatic automatically reseed every time the function is called Inherited use externally seeded random numbers seed use an explicit integer or strings as a seed - DimensionReduce[…,FeatureExtractor"Minimal"] indicates that the internal preprocessing should be as simple as possible.
Examples
open allclose allBasic Examples (2)Summary of the most common use cases
Reduce the dimension of vectors:

https://wolfram.com/xid/0d6gsbywf2-t51o2a

https://wolfram.com/xid/0d6gsbywf2-9e53pz

Specify that the target dimension should be 1:

https://wolfram.com/xid/0d6gsbywf2-3nhpq8

Reduce the dimension of a mixed-type dataset:

https://wolfram.com/xid/0d6gsbywf2-zt6cqe

Scope (6)Survey of the scope of standard use cases
Create and visualize random 3D vectors:

https://wolfram.com/xid/0d6gsbywf2-eg1rcs

https://wolfram.com/xid/0d6gsbywf2-oanlck

Visualize this dataset reduced to two dimensions:

https://wolfram.com/xid/0d6gsbywf2-h7iufj

Reduce the dimension of a dataset of images:

https://wolfram.com/xid/0d6gsbywf2-kzhnwu

Reduce the dimension of textual data:

https://wolfram.com/xid/0d6gsbywf2-mfh7fb

Reduce the dimension of a list of DateObject:

https://wolfram.com/xid/0d6gsbywf2-1bvc2c

Reduce the dimension of a mixed-type dataset:

https://wolfram.com/xid/0d6gsbywf2-ksjcxt

Reduce the dimension of a list of associations:

https://wolfram.com/xid/0d6gsbywf2-myka0y

Options (6)Common values & functionality for each option
FeatureExtractor (1)
FeatureTypes (1)
Reduce the dimension of a simple dataset:

https://wolfram.com/xid/0d6gsbywf2-9einrr

The first feature has been interpreted as numerical. Use FeatureTypes to enforce the interpretation of the first feature as nominal:

https://wolfram.com/xid/0d6gsbywf2-noogrg

Method (2)
Reduce the dimension of the Fisher iris dataset using the t-SNE method:

https://wolfram.com/xid/0d6gsbywf2-8pmijs

https://wolfram.com/xid/0d6gsbywf2-zkwqoh
Visualize the reduced dataset:

https://wolfram.com/xid/0d6gsbywf2-dmige5

Perform the same operation using a different perplexity value:

https://wolfram.com/xid/0d6gsbywf2-t6jes2

https://wolfram.com/xid/0d6gsbywf2-hc3c1y

Reduce the dimension of some images using the auto-encoder method:

https://wolfram.com/xid/0d6gsbywf2-1kk4ik

https://wolfram.com/xid/0d6gsbywf2-57tu7w
Visualize the reduced dataset:

https://wolfram.com/xid/0d6gsbywf2-1heqne

PerformanceGoal (1)

https://wolfram.com/xid/0d6gsbywf2-1f875d
Reduce the dimension of the images data with the setting PerformanceGoal"Quality" and measure the training time:

https://wolfram.com/xid/0d6gsbywf2-phlfj1

Perform the same operation using PerformanceGoal"Speed":

https://wolfram.com/xid/0d6gsbywf2-ju2wtv


https://wolfram.com/xid/0d6gsbywf2-79ai06


https://wolfram.com/xid/0d6gsbywf2-j442dg

TargetDevice (1)
Reduce the dimension of vectors using a fully connected "AutoEncoder" on the system's default GPU and look at its AbsoluteTiming:

https://wolfram.com/xid/0d6gsbywf2-nni7sq
Compare the previous timing with the one obtained by using the default CPU computation:

https://wolfram.com/xid/0d6gsbywf2-x7frfj
Applications (1)Sample problems that can be solved with this function
Dataset Visualization (1)
Load the Fisher iris dataset from ExampleData:

https://wolfram.com/xid/0d6gsbywf2-i0qojo

https://wolfram.com/xid/0d6gsbywf2-dvaxto


https://wolfram.com/xid/0d6gsbywf2-ljl8f4

Reduce the dimension of the features:

https://wolfram.com/xid/0d6gsbywf2-hf3wmk
Group the examples by their species:

https://wolfram.com/xid/0d6gsbywf2-u41y3o
Visualize the reduced dataset:

https://wolfram.com/xid/0d6gsbywf2-ck8dgi

Wolfram Research (2015), DimensionReduce, Wolfram Language function, https://reference.wolfram.com/language/ref/DimensionReduce.html (updated 2018).
Text
Wolfram Research (2015), DimensionReduce, Wolfram Language function, https://reference.wolfram.com/language/ref/DimensionReduce.html (updated 2018).
Wolfram Research (2015), DimensionReduce, Wolfram Language function, https://reference.wolfram.com/language/ref/DimensionReduce.html (updated 2018).
CMS
Wolfram Language. 2015. "DimensionReduce." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2018. https://reference.wolfram.com/language/ref/DimensionReduce.html.
Wolfram Language. 2015. "DimensionReduce." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2018. https://reference.wolfram.com/language/ref/DimensionReduce.html.
APA
Wolfram Language. (2015). DimensionReduce. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DimensionReduce.html
Wolfram Language. (2015). DimensionReduce. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DimensionReduce.html
BibTeX
@misc{reference.wolfram_2025_dimensionreduce, author="Wolfram Research", title="{DimensionReduce}", year="2018", howpublished="\url{https://reference.wolfram.com/language/ref/DimensionReduce.html}", note=[Accessed: 25-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_dimensionreduce, organization={Wolfram Research}, title={DimensionReduce}, year={2018}, url={https://reference.wolfram.com/language/ref/DimensionReduce.html}, note=[Accessed: 25-March-2025
]}