posact#

posact(data, weights, sphere=None)#

Flip ICA components whose negative samples have the larger RMS.

Parameters:
  • data (Any) – Channels by samples input data.

  • weights (Any) – Components by sphered-channels ICA weights.

  • sphere (Any | None) – Sphering matrix, or None for identity.

Returns:

Reoriented activations, inverse unmixing matrix, and weights. All three outputs describe the same sign convention.

Return type:

tuple[ndarray, ndarray, ndarray]