rdm.rdms docs
@@ -12,8 +12,7 @@ from pyrsa.util.descriptor_utils import format_descriptor
class RDMs:
- """
- RDMs class.
+ """ RDMs class
Args:
dissimilarities (numpy.ndarray):
@@ -23,10 +22,13 @@ class RDMs:
a description of the dissimilarity measure (e.g. 'Euclidean')
descriptors (dict):
descriptors with 1 value per RDMs object
- pattern_descriptors (dict)
+ pattern_descriptors (dict):
descriptors with 1 value per RDM column
- Returns:
- RDMs object
+
+ Attributes:
+ n_rdm(int): number of rdms
+ n_cond(int): number of patterns
+
"""
def __init__(self, dissimilarities,
dissimilarity_measure=None,
@@ -66,15 +68,19 @@ class RDMs:
def get_vectors(self):
""" Returns RDMs as np.ndarray with each RDM as a vector
+
Returns:
- RDMs as with one vector as one RDM
+ numpy.ndarray: RDMs as with one vector per RDM
+
"""
return self.dissimilarities
def get_matrices(self):
""" Returns RDMs as np.ndarray with each RDM as a matrix
+
Returns:
- RDMs as with one matrix as one RDM
+ numpy.ndarray: RDMs as with one matrix per RDM
+
"""
matrices, _, _ = batch_to_matrices(self.dissimilarities)
return matrices
