mmcci.sc.dissimilarity_score
- mmcci.sc.dissimilarity_score(m1, m2, lmbda=0.5, normalise=False, binary=False, trim=False, only_non_zero=False)[source]
Calculates a dissimilarity score between two matrices.
- Parameters:
m1 (pd.DataFrame) – Two matrices to compare.
m2 (pd.DataFrame) – Two matrices to compare.
lmbda (float) (optional) – Weighting factor for weighted vs binary dissimilarity (0-1). 0 is fully binary and 1 is fully weighted. Defaults to 0.5.
normalise (bool) (optional) – Normalizes matrices before comparison. Defaults to False.
binary (bool) (optional) – Treats matrices as binary (0 or 1). Defaults to False.
trim (bool) (optional) – Trims matrices to common rows and columns. Otherwise pads 0s to uncommon rows and columns. Defaults to False.
only_non_zero (bool) (optional) – Only considers non-zero edges for calculation. Defaults to False.
- Returns:
The dissimilarity scores between the two matrices.
- Return type:
pd.DataFrame