Dimensionality reduction

Supported in: Batch

Reduces dimensionality of an n-dimensional array to a k-dimensional array by applying principal component analysis.

Transform categories: Other

Declared arguments

  • Column - Column with arrays on which dimensionality reduction will be applied.
    Column<Embedded vector | Embedded vector>
  • Dataset - Dataset to apply dimensionality reduction to.
    Table
  • optional Output dimensions - Dimension of the output array after reduction is applied.
    Literal<Integer>

Examples

Example 1: Base case

Argument values:

  • Column: array
  • Dataset: ri.foundry.main.dataset.a
  • Output dimensions: 2

Input:

array
[ 1.0, 2.0, 3.0 ]
[ 4.0, 5.0, 6.0 ]
[ 7.0, 8.0, 9.0 ]
[ 10.0, 11.0, 12.0 ]

Output:

arrayarray_pca
[ 1.0, 2.0, 3.0 ][ -3.46, 1.36 ]
[ 4.0, 5.0, 6.0 ][ -8.66, 1.36 ]
[ 7.0, 8.0, 9.0 ][ -13.85, 1.36 ]
[ 10.0, 11.0, 12.0 ][ -19.05, 1.36 ]

Example 2: Base case

Argument values:

  • Column: array
  • Dataset: ri.foundry.main.dataset.a
  • Output dimensions: 3

Input:

array
[ 1.0, 2.0, 3.0, 4.0, 5.0 ]
[ 6.0, 7.0, 8.0, 9.0, 10.0 ]
[ 11.0, 12.0, 13.0, 14.0, 15.0 ]
[ 16.0, 17.0, 18.0, 19.0, 20.0 ]

Output:

arrayarray_pca
[ 1.0, 2.0, 3.0, 4.0, 5.0 ][ -6.71, -2.24, -1.73 ]
[ 6.0, 7.0, 8.0, 9.0, 10.0 ][ -17.89, -2.24, -1.73 ]
[ 11.0, 12.0, 13.0, 14.0, 15.0 ][ -29.07, -2.24, -1.73 ]
[ 16.0, 17.0, 18.0, 19.0, 20.0 ][ -40.25, -2.24, -1.73 ]

Example 3: Null case

Argument values:

  • Column: array
  • Dataset: ri.foundry.main.dataset.a
  • Output dimensions: 2

Input:

array
[ 1.0, null ]
[ null, null ]
[ null, 1.0 ]

Output:

arrayarray_pca
[ 1.0, null ][ -0.7, 0.7 ]
[ null, null ][ 0.0, 0.0 ]
[ null, 1.0 ][ 0.7, 0.7 ]

Example 4: Null case

Argument values:

  • Column: array
  • Dataset: ri.foundry.main.dataset.a
  • Output dimensions: 2

Input:

array
[ 1.0, null ]
null
[ null, 1.0 ]

Output:

arrayarray_pca
[ 1.0, null ][ -0.7, 0.7 ]
[ null, 1.0 ][ 0.7, 0.7 ]