Representational Similarity Analysis¶
This analysis aims at finding common representation of stimulus (or experimental variable), in different brain areas and across-modalities.
You can cite Kriegeskorte et al., 2008
sekupy.analysis.rsa.rsa module¶
- class sekupy.analysis.rsa.rsa.RSA(n_jobs=1, permutation=0, verbose=1, name='rsa', **kwargs)[source]¶
Implement representational similarity analysis (RSA) using an arbitrary type of similarity measure.
- Parameters:
n_jobs (int, optional. Default is -1.) – The number of CPUs to use to do the computation. -1 means ‘all CPUs’.
scoring (string or callable, optional) – The scoring strategy to use. See the scikit-learn documentation
- permutationint. Default is 0.
The number of permutation to be performed. If the number is 0, no permutation is performed.
- verboseint, optional
Verbosity level. Defaut is False
- scores¶
The dictionary of results for each roi selected. The key is the union of the name of the roi and the value(s). The value is a list of values, the number is equal to the permutations.
- Type:
dict.
- fit(ds, roi='all', roi_values=None, metric='euclidean', prepro=<sekupy.preprocessing.base.Transformer object>, **kwargs)[source]¶
Fits the RSA on the dataset
- Parameters:
ds ([type]) – [description]
cv_attr (str, optional) – [description] (the default is ‘chunks’, which [default_description])
roi (list, optional) – list of strings that must be present in ds.fa keys (the default is ‘all’, which [default_description])
roi_values (list, optional) – A list of key, value tuple where the key is the roi name, specified in ds.fa.roi and value is the value of the subroi. (the default is None, which [default_description])
distance (str, optional) – The metric to be used to calculate the dissimilarity. (default: euclidean)
prepro ([type], optional) – [description] (the default is Transformer(), which [default_description])
return_predictions (bool, optional) – [description] (the default is False, which [default_description])
return_splits (bool, optional) – [description] (the default is True, which [default_description])