Skip to content

Fisher transforms

FisherTransform dataclass

FisherTransform(matrix: ndarray, eigenvectors: ndarray, eigenvalues: ndarray, retained_eigenvalues: ndarray, rank_rtol: float, threshold: float, whiten: bool)

Projection onto informative Fisher directions, optionally whitened.

Scores are never mean-centered. matrix maps raw score vectors from shape [..., P] to optimization coordinates [..., R].

Attributes:

  • matrix (ndarray) –

    Projection or whitening matrix with shape [P, R].

  • eigenvectors, eigenvalues

    Complete eigendecomposition of the symmetrized input Fisher matrix.

  • retained_eigenvalues (ndarray) –

    Eigenvalues above the numerical rank threshold.

  • rank_rtol, threshold

    Relative and absolute rank thresholds.

  • whiten (bool) –

    Whether retained directions are scaled by inverse square root eigenvalues.

input_dim property

input_dim: int

Return the raw score dimension P.

rank property

rank: int

Return the retained informative rank R.

dropped_directions property

dropped_directions: int

Return the number of projected-out score directions.

apply

apply(scores: ArrayLike, *, execution: ExecutionConfig | None = None) -> ndarray

Map raw scores into the fitted informative coordinate system.

to_dict

to_dict() -> dict[str, JsonValue]

Return a JSON-compatible representation.