DimensionReduce

DimensionReduce[{example1,example2,}]

projects the examples examplei to a lower-dimensional approximating manifold.

DimensionReduce[examples,n]

projects onto an approximating manifold in n-dimensional space.

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:
  • FeatureExtractorIdentityhow to extract features from which to learn
    FeatureNamesAutomaticnames to assign to elements of the examplei
    FeatureTypesAutomaticfeature types to assume for elements of the examplei
    MethodAutomaticwhich reduction algorithm to use
    PerformanceGoalAutomaticaspect of performance to optimize
    RandomSeeding1234what 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:
  • Automaticautomatically chosen method
    "LatentSemanticAnalysis"latent semantic analysis method
    "Linear"automatically choose the best linear method
    "LowRankMatrixFactorization"use a low-rank matrix factorization algorithm
    "PrincipalComponentsAnalysis"principal components analysis method
    "TSNE"t-distributed stochastic neighbor embedding algorithm
    "AutoEncoder"use a trainable autoencoder
    "LLE"locally linear embedding
    "Isomap"isometric mapping
  • For Method"TSNE", the following suboptions are supported:
  • "Perplexity"Automaticperplexity value to be used
    "LinearPrereduction"Falsewhether to perform a light linear pre-reduction before running the t-SNE algorithm
  • Possible settings for RandomSeeding include:
  • Automaticautomatically reseed every time the function is called
    Inheriteduse externally seeded random numbers
    seeduse 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 all

Basic Examples  (2)

Reduce the dimension of vectors:

Specify that the target dimension should be 1:

Reduce the dimension of a mixed-type dataset:

Scope  (6)

Create and visualize random 3D vectors:

Visualize this dataset reduced to two dimensions:

Reduce the dimension of a dataset of images:

Reduce the dimension of textual data:

Reduce the dimension of a list of DateObject:

Reduce the dimension of a mixed-type dataset:

Reduce the dimension of a list of associations:

Options  (6)

FeatureExtractor  (1)

Reduce the dimension of texts preprocessed by custom functions and an extractor method:

FeatureTypes  (1)

Reduce the dimension of a simple dataset:

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

Method  (2)

Reduce the dimension of the Fisher iris dataset using the t-SNE method:

Visualize the reduced dataset:

Perform the same operation using a different perplexity value:

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

Visualize the reduced dataset:

PerformanceGoal  (1)

Load the MNIST dataset:

Reduce the dimension of the images data with the setting PerformanceGoal"Quality" and measure the training time:

Perform the same operation using PerformanceGoal"Speed":

Visualize the results:

TargetDevice  (1)

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

Compare the previous timing with the one obtained by using the default CPU computation:

Applications  (1)

Dataset Visualization  (1)

Load the Fisher iris dataset from ExampleData:

Reduce the dimension of the features:

Group the examples by their species:

Visualize the reduced dataset:

Introduced in 2015
 (10.1)
 |
Updated in 2017
 (11.1)
2017
 (11.2)
2018
 (11.3)