crlb#

torchsim.crlb(jacobian, *, noise_variance=1.0, singular='raise')[source]#

The lowest variance an unbiased estimate of each parameter can have.

Parameters:
  • jacobian (torch.Tensor) – (..., parameters, samples) – the derivative of the signal with respect to each parameter being estimated. Real and imaginary parts are counted as separate measurements, which is what independent Gaussian noise on the two channels means.

  • noise_variance (float, optional) – The variance of that noise, in the units the signal is in.

  • singular ({"raise", "infinite"}, optional) – What to do where the parameters are not jointly identifiable. The default refuses, which is right for a design being scored: a sequence that cannot separate its parameters has no bound to report. "infinite" answers with an infinite variance at those entries instead, which is what a map wants, since one voxel of background need not stop the rest from being read.

Returns:

(..., parameters), the diagonal of the inverse Fisher matrix. What to do with it is the design’s: summing gives A-optimality, dividing by the parameter values first makes the sum dimensionless and so weights a short and a long relaxation time comparably.

Return type:

torch.Tensor

Raises:
  • ValueError – If the Jacobian has no parameter axis.

  • torch.linalg.LinAlgError – If the parameters are not jointly identifiable from these samples, which is a singular Fisher matrix and says the design cannot work at all rather than that it is imprecise.

Examples using torchsim.crlb#

PERK: kernel ridge regression

PERK: kernel ridge regression

Designing a joint relaxometry protocol

Designing a joint relaxometry protocol