hyperspy.learn.orthomax module

hyperspy.learn.orthomax.orthomax(A, gamma=1.0, tol=1.4901e-07, max_iter=256)

Calculate orthogonal rotations for a matrix of factors or loadings from PCA.

When gamma=1.0, this is known as varimax rotation, which finds a rotation matrix W that maximizes the variance of the squared components of A @ W. The rotation matrix preserves orthogonality of the components.

Taken from metpy.

Parameters:
  • A (numpy array) – Input data to unmix

  • gamma (float) – If gamma in range [0, 1], use SVD approach, otherwise solve with a sequence of bivariate rotations.

  • tol (float) – Tolerance of the stopping condition.

  • max_iter (int) – Maximum number of iterations before exiting without convergence.

Returns:

  • B (numpy array) – Rotated data matrix

  • W (numpy array) – The unmixing matrix