SMI plotting function

This is the SMI plotting function.

hoggormplot.SMI_plot.plotSMI(smi, pc='max', significance=True, X1name='X1', X2name='X2', B=10000, fontscale=1, figsize=None)

Diamond plot for Similarity of matrices index (SMI)

Parameters:
  • smi (SMI class object) – the SMI results to visualize.
  • pc (list, optional) – the number of components to display, default is ‘max’ = all components.
  • significance (boolean, optional) – plotting of significance symbols, added by default.
  • X1name (list, optional) – name of the first data set, default = ‘X1’.
  • X2name (list, optional) – name of the second data set, default = ‘X2’.
  • B (int, optional) – number of permutations to use with significance testing.
  • fontscale (double, optional) – scaling parameter for significance symbols and component labels.
  • figsize (tuple, optional) – Sets figure width and height in inches

Examples

>>> import numpy as np
>>> import hoggorm as ho
>>> import hoggormplot as hopl
>>> X1 = ho.center(np.random.rand(100,300))
>>> U, s, V = np.linalg.svd(X1, 0)
>>> X2 = np.dot(np.dot(np.delete(U, 2, 1), np.diag(np.delete(s, 2))), np.delete(V, 2, 0))
>>> smiOP = ho.SMI(X1, X2, ncomp1=10, ncomp2=10)
>>> print(smiOP.smi[:4,:4])
>>> hopl.plotSMI(smiOP)