runpca#

runpca(data, n_components=None, normalize=False)#

Decompose channel-major data into principal components.

Parameters:
  • data (Any) – Variables by observations matrix.

  • n_components (int | None) – Number of principal dimensions, or all available dimensions.

  • normalize (bool) – Put singular-value scaling in the components instead of the mixing matrix.

Returns:

Component time courses, mixing vectors, and a diagonal singular-value matrix. For centered input, mixing @ components reconstructs the retained-rank data.

Return type:

tuple[ndarray, ndarray, ndarray]