gives the KarhunenLoeve transform {{b1,b2,},m} of the numerical arrays {a1,a2,}, where m.aibi.


uses the inverse of the matrix m for transforming bi to ai.

Details and Options

  • KarhunenLoeve decomposition is typically used to reduce the dimensionality of data and capture the most important variation in the first few components.
  • The ai can be arbitrary rank arrays or images of the same dimensions.
  • The inner product of m and {a1,a2,} gives {b1,b2,}.
  • In KarhunenLoeveDecomposition[{a1,}], rows of the transformation matrix m are the eigenvectors of the covariance matrix formed from the arrays ai.
  • The matrix m is a linear transformation of ai. The transformed arrays bi are uncorrelated, are given in order of decreasing variance, and have the same total variance as ai.
  • KarhunenLoeveDecomposition[{b1,b2,},m] effectively computes the inverse KarhunenLoeve transformation. If the length of {b1,b2,} is less than the size of m, missing components are assumed to be zero.
  • With an option setting StandardizedTrue, datasets ai are shifted so that their means are zero.


open all close all

Basic Examples  (2)

KarhunenLoeve decomposition of two datasets:

Click for copyable input

Principal component decomposition of RGB color channels:

Click for copyable input

Scope  (5)

Options  (1)

Applications  (3)

Properties & Relations  (7)

Introduced in 2010
Updated in 2015