nimare.results
.MetaResult
- class MetaResult(estimator, corrector=None, diagnostics=None, mask=None, maps=None, tables=None, description='')[source]
Bases:
NiMAREBase
Base class for meta-analytic results.
Changed in version 0.1.0:
Added corrector and diagnostics attributes.
Changed in version 0.0.12:
Added the description attribute.
- Parameters:
estimator (
Estimator
) – The Estimator used to generate the maps in the MetaResult.corrector (
Corrector
) – The Corrector used to correct the maps in the MetaResult.diagnostics (
list
ofDiagnostics
) – List of diagnostic classes.mask (Niimg-like or
nilearn.input_data.base_masker.BaseMasker
) – Mask for converting maps between arrays and images.maps (None or
dict
ofnumpy.ndarray
, optional) – Maps to store in the object. The maps must be provided as 1D numpy arrays. Default is None.tables (None or
dict
ofpandas.DataFrame
, optional) – Pandas DataFrames to store in the object. Default is None.description (
str
, optional) – Description of the method that generated the result. Default is “”.
- Variables:
estimator (
Estimator
) – The Estimator used to generate the maps in the MetaResult.corrector (
Corrector
) – The Corrector used to correct the maps in the MetaResult.diagnostics (
list
ofDiagnostics
) – List of diagnostic classes.masker (
NiftiMasker
or similar) – Masker object.maps (
dict
) – Keys are map names and values are 1D arrays.tables (
dict
) – Keys are table levels and values are pandas DataFrames.description (
str
) –A textual description of the method that generated the result.
Citations in this description are formatted according to
natbib
’s LaTeX format.bibtex (
str
) –The BibTeX entries for any citations in
description
. These entries are extracted from NiMARE’s references.bib file and filtered based on the description automatically.Users should be able to copy the contents of the
bibtex
attribute into their own BibTeX file without issue.
Methods
copy
()Return copy of result object.
get_map
(name[, return_type])Get stored map as image or array.
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.
save_maps
([output_dir, prefix, prefix_sep, ...])Save results to files.
save_tables
([output_dir, prefix, ...])Save result tables to TSV files.
set_params
(**params)Set the parameters of this estimator.
Properties
A textual description of the method that generated the result.
- get_map(name, return_type='image')[source]
Get stored map as image or array.
- Parameters:
name (
str
) – Name of the map. Used to index self.maps.return_type ({'image', 'array'}, optional) – Whether to return a niimg (‘image’) or a numpy array. Default is ‘image’.
- classmethod load(filename, compressed=True)[source]
Load a pickled class instance from file.
- Parameters:
- Returns:
obj – Loaded class object.
- Return type:
class object
- save_maps(output_dir='.', prefix='', prefix_sep='_', names=None)[source]
Save results to files.
- Parameters:
output_dir (
str
, optional) – Output directory in which to save results. If the directory doesn’t exist, it will be created. Default is current directory.prefix (
str
, optional) – Prefix to prepend to output file names. Default is None.prefix_sep (
str
, optional) – Separator to add between prefix and default file names. Default is _.names (None or
list
ofstr
, optional) – Names of specific maps to write out. If None, save all maps. Default is None.
- save_tables(output_dir='.', prefix='', prefix_sep='_', names=None)[source]
Save result tables to TSV files.
- Parameters:
output_dir (
str
, optional) – Output directory in which to save results. If the directory doesn’t exist, it will be created. Default is current directory.prefix (
str
, optional) – Prefix to prepend to output file names. Default is None.prefix_sep (
str
, optional) – Separator to add between prefix and default file names. Default is _.names (None or
list
ofstr
, optional) – Names of specific tables to write out. If None, save all tables. Default is None.
- 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.results.MetaResult
Use NeuroVault statistical maps in NiMARE
Coordinate-based meta-analysis algorithms
Image-based meta-analysis algorithms
Compare image and coordinate based meta-analyses
Simulate data for coordinate based meta-analysis
Run a coordinate-based meta-analysis (CBMA) workflow
Coordinate-based meta-regression algorithms
Run an image-based meta-analysis (IBMA) workflow