pyfli.analysis.precision.fisher_crlb#
Generic Fisher information and Cramér-Rao lower bound (CRLB) tools.
Functions
|
Cramér-Rao bound on the covariance, |
|
Smallest achievable coefficient of variation |
|
Smallest achievable standard deviation of parameter index, per batch entry. |
|
Statistical efficiency |
|
Photon-economy F-value |
|
Fisher matrices |
|
Fisher matrices |
|
Central-difference Jacobian |
|
Fisher matrices |
|
Fisher sub-matrices for the parameters in indices, i.e. the information when every other parameter is known exactly and not estimated. |
- numerical_jacobian(model, params, rel_step=1e-4, abs_step=1e-8)[source]#
Central-difference Jacobian
dmu/dthetaof a batched model.- Parameters:
model (
Callable) –model(params)with params(P, K)returning channel means(P, T).params (
np.ndarray) – Parameter vectors(P, K)(or(K,)for a single one).rel_step (
float) – Step for parameterkismax(rel_step * |theta_k|, abs_step).abs_step (
float) – Step for parameterkismax(rel_step * |theta_k|, abs_step).
- Returns:
Jacobian of shape
(P, K, T).- Return type:
np.ndarray
- poisson_fisher_information(mu, jacobian)[source]#
Fisher matrices
(P, K, K)for independent Poisson channels with means mu(P, T)and Jacobian(P, K, T). Channels withmu <= 0carry no information and are skipped.
- gaussian_fisher_information(sigma, jacobian)[source]#
Fisher matrices
(P, K, K)for independent Gaussian channels with known noise standard deviation sigma (scalar,(T,)or(P, T)).
- fisher_information(model, params, noise='poisson', sigma=None, jacobian=None, rel_step=1e-4, abs_step=1e-8)[source]#
Fisher matrices
(P, K, K)of a batched model at params(P, K).- Parameters:
model (
Callable) –model(params)-> channel means(P, T).params (
np.ndarray) – Parameter vectors(P, K).noise (
str) –"poisson"(counts; the means come from the model) or"gaussian"(needs sigma).sigma (
Any) – Noise standard deviation fornoise="gaussian".jacobian (
np.ndarray | None) – Analytic Jacobian(P, K, T); computed numerically when None.rel_step (
float) – Finite-difference steps (seenumerical_jacobian()).abs_step (
float) – Finite-difference steps (seenumerical_jacobian()).
- Return type:
- select_parameters(info, indices)[source]#
Fisher sub-matrices for the parameters in indices, i.e. the information when every other parameter is known exactly and not estimated.
- crlb_covariance(info)[source]#
Cramér-Rao bound on the covariance,
I^-1per batch entry. A (near-)singular Fisher matrix – an unidentifiable parameter – falls back to the pseudo-inverse.
- crlb_std(info, index)[source]#
Smallest achievable standard deviation of parameter index, per batch entry.
- crlb_cv(info, value, index)[source]#
Smallest achievable coefficient of variation
std / valueof parameter index.