nimare.decode.discrete
.brainmap_decode
- brainmap_decode(coordinates, annotations, ids, ids2=None, features=None, frequency_threshold=0.001, u=0.05, correction='fdr_bh')[source]
Perform image-to-text decoding for discrete inputs according to the BrainMap method.
This method was described in Amft et al.[1].
- Parameters:
coordinates (
pandas.DataFrame
) – DataFrame containing coordinates. Must include a column named ‘id’ and must have a separate row for each reported peak coordinate for each study (i.e., there are multiple rows per ID). IDs fromcoordinates
must match those fromannotations
.annotations (
pandas.DataFrame
) – DataFrame containing labels. Must include a column named ‘id’ and each row must correspond to a study. Other columns may correspond to individual labels. IDs fromannotations
must match those fromcoordinates
.ids (
list
) – Subset of studies in coordinates/annotations dataframes indicating target for decoding. Examples include studies reporting at least one peak in an ROI, or studies selected from a clustering analysis.ids2 (
list
or None, optional) – Second subset of studies, representing “unselected” studies. If None, then all studies in coordinates/annotations dataframes not inids
will be used.features (
list
, optional) – List of features in dataset annotations to use for decoding. Default is None, which uses all features available.frequency_threshold (
float
, optional) – Threshold to apply to dataset annotations. Values greater than or equal to the threshold as assigned as label+, while values below the threshold are considered label-. Default is 0.001.u (
float
, optional) – Alpha level for multiple comparisons correction. Default is 0.05.correction ({None, "bh", "by", "bonferroni"}, optional) – Multiple comparisons correction method to apply. Default is ‘bh’ (Benjamini-Hochberg FDR correction).
- Returns:
out_df – Table with each label and the following values associated with each label: ‘pForward’, ‘zForward’, ‘likelihoodForward’, ‘pReverse’, ‘zReverse’, and ‘probReverse’.
- Return type:
See also
BrainMapDecoder()
The associated class for this method.
References