nimare.diagnostics
.FocusCounter
- class FocusCounter(target_image='z_desc-size_level-cluster_corr-FWE_method-montecarlo', voxel_thresh=None, cluster_threshold=None, display_second_group=False, n_cores=1)[source]
Bases:
Diagnostics
Run a focus-count analysis on a coordinate-based meta-analysis result.
Changed in version 0.1.2:
Support for pairwise meta-analyses.
Changed in version 0.0.14:
New parameter: cluster_threshold.
Return clusters table.
Changed in version 0.0.13: Change cluster neighborhood from faces+edges to faces, to match Nilearn.
Added in version 0.0.12.
Notes
This analysis characterizes the relative contribution of each experiment in a meta-analysis to the resulting clusters by counting the number of peaks from each experiment that fall within each significant cluster.
Warning
This method only works for coordinate-based meta-analyses.
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 analysis to a MetaResult.
- 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
- transform(result)[source]
Apply the analysis to a MetaResult.
- Parameters:
result (
MetaResult
) – A MetaResult produced by a coordinate- or image-based meta-analysis.- Returns:
Results of Diagnostics fitting.
- Return type:
Notes
This method adds two new keys to
maps
andtables
attributes of the MetaResult object.<target_image>_diag-<Jackknife|FocusCounter>_tab-counts
:pandas.DataFrame
or None. A DataFrame with information about relative contributions of each experiment to each cluster in the thresholded map. There is one row for each experiment. There is one column for each cluster, with column names beingPostiveTail
/NegativeTail
indicating the sign (+/-) of the cluster’s statistical values, plus an integer indicating the cluster’s associated value in thelabel_maps[0]
/label_maps[1]
output. If no clusters are found or a pairwise Estimator was used,None
is returned.<target_image>_tab-clust
:pandas.DataFrame
A DataFrame with information about each cluster. There is one row for each cluster. The columns in this table include:Cluster ID
(the cluster id, plus a letter for subpeaks only),X
/Y
/Z
(coordinate for the center of mass),Max Stat
(statistical value of the peak), andCluster Size (mm3)
(the size of the cluster, in cubic millimeters). If no clusters are found, this table will be empty.label_<target_image>_tail-<positive|negative>
:numpy.ndarray
Label maps. Each cluster in the map has a single value, which corresponds to the cluster number of the column name incontribution_table
. If target_image has negative values after thresholding, first and second maps correspond to positive and negative tails. If no clusters are found, this list will be empty.