Analysis package

What is included?

Analyses package includes a series of algorithm used in multivariate neuroimaging analyses

sekupy.analysis.base module

class sekupy.analysis.base.Analyzer(name='analyzer', **kwargs)[source]

Base class for neuroimaging analysis components.

The Analyzer class extends Node to provide core functionality for neuroimaging analyses in the sekupy framework. It handles analysis configuration, execution, and result storage following BIDS conventions.

Parameters:
  • name (str, optional) – Name identifier for the analyzer, by default ‘analyzer’

  • **kwargs (dict) –

    Additional configuration parameters including: - id : str, optional

    Unique identifier for the analysis instance

    • numint, optional

      Number identifier for the analysis, by default 1

id

Unique identifier for the analysis instance

Type:

str

num

Number identifier for the analysis

Type:

int

fit(ds, **kwargs)[source]

Fit the analyzer to the provided dataset.

This method stores information about the dataset and analysis configuration for later use in saving results.

Parameters:
  • ds (Dataset) – The dataset to analyze

  • **kwargs (dict) – Additional parameters for the analysis

Return type:

None

save(path=None, **kwargs)[source]

Basic function for saving information about the analysis. Basically it should be overriden in subclasses.

This implementation creates the folder in which results are stored, following BIDS specification.

Parameters:
  • path (str, optional) –

    The pathname where results are stored, if None is passed it creates the directory

    (the default is None, which [default_description])

  • **kwargs (dict, optional) – Dictionary of keywords used for directory creation.

Returns:

path – The directory created or the path passed as parameter.

Return type:

str

sekupy.analysis.configurator module

sekupy.analysis.iterator module

class sekupy.analysis.iterator.AnalysisIterator(options, configurator, kind='combination', config_kwargs={})[source]
next()[source]

sekupy.analysis.pipeline module

class sekupy.analysis.pipeline.AnalysisPipeline(configurator, name='base')[source]
fit(ds=None, **kwargs)[source]

Fit the analysis on the dataset.

Parameters:
  • ds (pymvpa dataset) – The dataset is the input to the analysis.

  • kwargs (dict) – Optional parameters for the analysis.

save(path=None, subdir='0_results', save_ds=False, **kwargs)[source]

Basic function for saving information about the analysis. Basically it should be overriden in subclasses.

This implementation creates the folder in which results are stored, following BIDS specification.

Parameters:
  • path (str, optional) –

    The pathname where results are stored, if None is passed it creates the directory

    (the default is None, which [default_description])

  • **kwargs (dict, optional) – Dictionary of keywords used for directory creation.

Returns:

path – The directory created or the path passed as parameter.

Return type:

str

sekupy.analysis.roi module

sekupy.analysis.utils module

sekupy.analysis.utils.get_params(param_dict, keyword)[source]

[summary]

Parameters:
  • param_dict ([type]) – [description]

  • keyword ([type]) – [description]

Returns:

[description]

Return type:

[type]

sekupy.analysis.utils.get_rois(ds, roi)[source]

Gets the roi list if the attribute is all

Module contents

sekupy.analysis.run_analysis(ds, default_config, default_options={}, name='mvpa', subdir='0_results', kind='combination')[source]

[summary]

Parameters:
  • ds ([type]) – [description]

  • default_config ([type]) – [description]

  • default_options ([type]) – [description]

  • name ([type]) – [description]

  • subdir (str, optional) – [description] (the default is “0_results”, which [default_description])

  • kind (str) – Indicates the type of datum given to options field. (values must be ‘combination’, ‘list’ or ‘configuration’) if ‘combination’ all possible combination of items in options will be performed as a cartesian product of lists. if ‘list’, elements of dictionary lists must have the same length if ‘configuration’ the elements are single configuration to be used ‘combination’ or ‘list’ or ‘configurations’ see `sekupy.analysis.iterator.AnalysisIterator` documentation.

Returns:

errs – Returns the list of errors with the configuration that caused the error.

Return type:

list