bayesian_ivim
bayesian_ivim
¶
Two-stage Bayesian IVIM fitting with empirical priors.
Implements the Barbieri et al. (MRM 2020) approach: 1. Stage 1: Least-squares fit on all voxels 2. Build empirical per-parameter priors from the population of Stage 1 fits 3. Stage 2: MAP fitting with empirical priors and per-voxel initial guesses
References
.. [1] Barbieri S et al. MRM 2020;83(6):2160-2172. doi:10.1002/mrm.28060
TwoStageBayesianIVIMFitter
¶
TwoStageBayesianIVIMFitter(
noise_std=None,
compute_uncertainty=False,
prior_scale=1.5,
stage1_max_iter=100,
)
Two-stage Bayesian IVIM fitter with empirical priors.
Stage 1 runs a standard Levenberg-Marquardt fit to obtain point estimates. Those estimates are used to build per-parameter empirical priors (mean + std). Stage 2 runs a Bayesian MAP fit using those priors as regularization.
| PARAMETER | DESCRIPTION |
|---|---|
noise_std
|
Assumed noise standard deviation. If None, estimated from data.
TYPE:
|
compute_uncertainty
|
If True, compute posterior uncertainty maps via Laplace approximation after Stage 2.
TYPE:
|
prior_scale
|
Scale factor applied to empirical prior standard deviations. Larger values create weaker priors. Default 1.5.
TYPE:
|
stage1_max_iter
|
Maximum iterations for Stage 1 LM fitting.
TYPE:
|
fit_image
¶
Fit IVIM model using two-stage Bayesian approach.
| PARAMETER | DESCRIPTION |
|---|---|
model
|
Bound IVIM model.
TYPE:
|
data
|
Image data, shape
TYPE:
|
mask
|
Boolean mask.
TYPE:
|
bounds_override
|
Per-parameter bound overrides.
TYPE:
|
progress_callback
|
Progress callback (0.0 to 1.0).
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict[str, ParameterMap]
|
Parameter maps. |