Skip to content

Fisher information: scorequant.information

information_report, efficient_score_bound and retention_uncertainty are on the top level.

fisher_information

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

Estimate unbinned Fisher information.

Parameters:

  • scores (ArrayLike) –

    Finite score matrix with shape [N, P].

  • weights (ArrayLike | None, default: None ) –

    Optional finite, nonnegative weights with shape [N].

Returns:

  • ndarray –

    Matrix sum_i w_i s_i s_i.T with shape [P, P].

binned_fisher_information

binned_fisher_information(
    scores: ArrayLike,
    assignments: ArrayLike,
    weights: ArrayLike | None = None,
    *,
    n_bins: int | None = None,
    execution: ExecutionConfig | None = None,
) -> ndarray

Estimate Fisher information retained by hard bin counts.

Parameters:

  • scores (ArrayLike) –

    Finite score matrix with shape [N, P].

  • assignments (ArrayLike) –

    Integer bin label for every input row, with shape [N].

  • weights (ArrayLike | None, default: None ) –

    Optional finite, nonnegative weights with shape [N].

  • n_bins (int | None, default: None ) –

    Total number of bins. Inferred from the largest effective label when omitted; provide it explicitly to preserve trailing empty bins.

Returns:

  • ndarray –

    Hard-binned Fisher matrix with shape [P, P].

fractional_fisher_information

fractional_fisher_information(
    scores: ArrayLike,
    responsibilities: ArrayLike,
    weights: ArrayLike | None = None,
    *,
    execution: ExecutionConfig | None = None,
) -> ndarray

Estimate Fisher information retained by fractional assignments.

Parameters:

  • scores (ArrayLike) –

    Finite score matrix with shape [N, P].

  • responsibilities (ArrayLike) –

    Finite nonnegative responsibilities with shape [N, B] whose effective rows sum to one.

  • weights (ArrayLike | None, default: None ) –

    Optional finite, nonnegative weights with shape [N].

Returns:

  • ndarray –

    Fractionally binned Fisher matrix with shape [P, P].

profiled_information_report

profiled_information_report(
    scores: ArrayLike,
    assignments: ArrayLike,
    *,
    interest: tuple[int, ...],
    weights: ArrayLike | None = None,
    n_bins: int | None = None,
    schema: ScoreSchema | None = None,
    execution: ExecutionConfig | None = None,
) -> ProfiledInformationReport

Build same-label profiled-\(D_s\) diagnostics without regularization.

Parameters:

  • scores (ArrayLike) –

    Finite score matrix with shape [N, P] in the declared parameter order.

  • assignments (ArrayLike) –

    Integer bin label for every input row.

  • interest (tuple[int, ...]) –

    Unique nonnegative score-column indices for parameters of interest.

  • weights (ArrayLike | None, default: None ) –

    Optional nonnegative measure weights.

  • n_bins (int | None, default: None ) –

    Total number of bins, including empty bins.

Returns:

efficient_scores

efficient_scores(
    scores: ArrayLike,
    *,
    interest: tuple[int, ...],
    weights: ArrayLike | None = None,
    execution: ExecutionConfig | None = None,
) -> ndarray

Project scores with the full-information nuisance regression.

This constructs the explicit lower-dimensional upper problem for profiled information. Quantizing the result with ordinary D-optimality is not the same finite task as profiling nuisance from the resulting labels.

Parameters:

  • scores (ArrayLike) –

    Finite score matrix in the declared parameter order.

  • interest (tuple[int, ...]) –

    Unique nonnegative score-column indices for parameters of interest.

  • weights (ArrayLike | None, default: None ) –

    Optional nonnegative reference-measure weights used for the full information regression.

Returns:

  • ndarray –

    Full-information efficient scores with shape [N, len(interest)].