nimare.parcellate.mapbot.MAPBOT

class MAPBOT(tfidf_df, coordinates_df, mask)[source]

Meta-analytic parcellation based on text (MAPBOT) [R84461f98615b-1].

Parameters:
  • tfidf_df (pandas.DataFrame) – A DataFrame with feature counts for the model. The index is ‘id’, used for identifying studies. Other columns are features (e.g., unigrams and bigrams from Neurosynth), where each value is the number of times the feature is found in a given article.
  • coordinates_df (pandas.DataFrame) – A DataFrame with a list of foci in the dataset. The index is ‘id’, used for identifying studies. Additional columns include ‘i’, ‘j’ and ‘k’ (the matrix indices of the foci in standard space).
  • mask (str or nibabel.Nifti1.Nifti1Image) – Mask file or image.

Notes

MAPBOT uses both the reported foci for studies, as well as associated term weights. Here are the steps:

  1. For each voxel in the mask, identify studies in dataset corresponding to that voxel. Selection criteria can be either based on a distance threshold (e.g., all studies with foci within 5mm of voxel) or based on a minimum number of studies (e.g., the 50 studies reporting foci closest to the voxel).
  2. For each voxel, compute average frequency of each term across selected studies. This results in an n_voxels X n_terms frequency matrix F.
  3. Compute n_voxels X n_voxels value matrix V: - D = (F.T * F) * ones(F) - V = F * D^-.5
  4. Perform non-negative matrix factorization on value matrix.

Warning

This method is not yet implemented.

References

[R84461f98615b-1]Yuan, Rui, et al. “MAPBOT: Meta-analytic parcellation based on text, and its application to the human thalamus.” NeuroImage 157 (2017): 716-732. https://doi.org/10.1016/j.neuroimage.2017.06.032

Methods

fit(self, target_mask[, method, r, n_exps, …]) Run MAPBOT parcellation.
get_params(self[, deep]) Get parameters for this estimator.
load(filename[, compressed]) Load a pickled class instance from file.
save(self, filename[, compress]) Pickle the class instance to the provided file.
set_params(self, \*\*params) Set the parameters of this estimator.
fit(self, target_mask, method='min_distance', r=5, n_exps=50, n_parcels=2)[source]

Run MAPBOT parcellation.

Parameters:
  • region_name (str) – Name of region for parcellation.
  • n_parcels (int, optional) – Number of parcels to generate for ROI. If array_like, each parcel number will be evaluated and results for all will be returned. Default is 2.
get_params(self, deep=True)[source]

Get parameters for this estimator.

Parameters:deep (boolean, optional) – If True, will return the parameters for this estimator and contained subobjects that are estimators.
Returns:params – Parameter names mapped to their values.
Return type:mapping of string to any
classmethod load(filename, compressed=True)[source]

Load a pickled class instance from file.

Parameters:
  • filename (str) – Name of file containing object.
  • compressed (bool, optional) – If True, the file is assumed to be compressed and gzip will be used to load it. Otherwise, it will assume that the file is not compressed. Default = True.
Returns:

obj – Loaded class object.

Return type:

class object

save(self, filename, compress=True)[source]

Pickle the class instance to the provided file.

Parameters:
  • filename (str) – File to which object will be saved.
  • compress (bool, optional) – If True, the file will be compressed with gzip. Otherwise, the uncompressed version will be saved. Default = True.
set_params(self, **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.

Returns:
Return type:self