nimare.diagnostics.ResampledStability
- class ResampledStability(target_image='z_desc-size_level-cluster_corr-FWE_method-montecarlo', resampling_policy='subsample', k=None, target_n=None, n_resamples=None, random_state=None, voxel_thresh=None, cluster_threshold=None, mask_coverage='gm', alpha=0.05, n_cores=1, generate_description=True)[source]
Bases:
NiMAREBaseEstimate voxelwise stability of thresholded results under dataset resampling.
Determine the stability of a meta-analytic result by applying a resampling policy to the input dataset and then characterizing the stability of the resulting meta-analytic map’s voxelwise and/or clusterwise significance. Based on the implementation in Frahm et al.[1].
- Parameters:
target_image ('str', optional) – The meta-analytic map for which stability will be characterized.
resampling_policy ({"leave_1_out", "leave_k_out", "subsample"}, optional) – The resampling policy to use.
k (int, optional) – The number of studies to leave out for each replicate when
resampling_policy="leave_k_out". Must be between 1 and n-1, where n is the number of studies in the meta-analysis.target_n (int, optional) – The number of studies to include in each replicate when
resampling_policy="subsample". Must be between 1 and n, where n is the number of studies in the meta-analysis. Default is n (i.e., subsamples are the same size as the original dataset).n_resamples (int, optional) – The number of resampled replicates to generate. If None, all possible unique replicates will be generated, up to a maximum of 1000 (to avoid combinatorial explosion).
random_state (int or None, optional) – Random seed for reproducibility when random sampling is used in the resampling policy. Default is None.
voxel_thresh (float or None, optional) – An optional voxel-level threshold that may be applied to the
target_imageto define clusters. This can be None if thetarget_imageis already thresholded (e.g., a cluster-level corrected map). Default is None.cluster_threshold (int or None, optional) – Cluster size threshold, in voxels. If None, then no cluster size threshold will be applied. Default is None.
mask_coverage ({"gm", "brain"}, optional) – Voxel set used as the randomisation prior for the
"subsample"policy."gm"restricts random foci to grey-matter voxels (mask image intensity > 0.1);"brain"uses all non-zero voxels. Default is"gm".alpha (float, optional) – Family-wise error rate for the Monte Carlo cluster-size threshold used in the
"subsample"policy. The(1 - alpha)percentile of the permutation null distribution is applied. Default is 0.05.n_cores (int, optional) – Number of cores to use for parallelization. If <=0, defaults to using all available cores. Default is 1.
generate_description (bool, optional) – Whether to append boilerplate text and extract references for the returned result. Default is True.
Methods
get_params([deep])Get parameters for this estimator.
load(filename[, compressed])Load a pickled class instance from file.
save(filename[, compress])Pickle the class instance to the provided file.
set_params(**params)Set the parameters of this estimator.
transform(result)Apply the resampling diagnostic to a fitted meta-analytic result.
- classmethod load(filename, compressed=True)[source]
Load a pickled class instance from file.
- Parameters:
- Returns:
obj – Loaded class object.
- Return type:
class object
- set_params(**params)[source]
Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects (such as pipelines). The latter have parameters of the form
<component>__<parameter>so that it’s possible to update each component of a nested object.- Return type:
self
Examples using nimare.diagnostics.ResampledStability
Stability diagnostics: Jackknife vs. ResampledStability