nimare.parcellate.mapbot¶
Meta-analytic parcellation based on text (MAPBOT).
Classes
MAPBOT (tfidf_df, coordinates_df, mask) |
Meta-analytic parcellation based on text (MAPBOT) [R84461f98615b-1]. |
-
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
ornibabel.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:
- 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).
- For each voxel, compute average frequency of each term across selected studies. This results in an n_voxels X n_terms frequency matrix F.
- Compute n_voxels X n_voxels value matrix V: - D = (F.T * F) * ones(F) - V = F * D^-.5
- Perform non-negative matrix factorization on value matrix.
Warning
This method is not yet implemented.
References
[R84461f98615b-1] (1, 2) 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:
-
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: Returns: obj – Loaded class object.
Return type: class object
-
save
(self, filename, compress=True)[source]¶ Pickle the class instance to the provided file.
Parameters:
-
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
- tfidf_df (