rsatoolbox.rdm.combine module

Functions operating on a set of related RDMs objects

rsatoolbox.rdm.combine.from_partials(list_of_rdms: List[RDMs], all_patterns: Optional[List[str]] = None, descriptor: str = 'conds') RDMs[source]

Make larger RDMs with missing values where needed

Any object-level descriptors will be turned into rdm_descriptors if they do not match across objects.

Parameters
  • list_of_rdms (list) – List of RDMs objects

  • all_patterns (list, optional) – The full list of pattern descriptors. Defaults to None, in which case the full list is the union of all input rdms’ values for the pattern descriptor chosen.

  • descriptor (str, optional) – The pattern descriptor on the basis of which to expand. Defaults to ‘conds’.

Returns

Object containing all input rdms on the larger scale,

with missing values where required

Return type

RDMs

rsatoolbox.rdm.combine.rescale(rdms, method: str = 'evidence')[source]

Bring RDMs closer together

Iteratively scales RDMs based on pairs in-common. Also adds an RDM descriptor with the weights used.

Parameters

method (str, optional) – One of ‘evidence’, ‘setsize’ or ‘simple’. Defaults to ‘evidence’.

Returns

RDMs object with the aligned RDMs

Return type

RDMs