function sym_inverse

deeptime.decomposition.deep.sym_inverse(mat, epsilon: float = 1e-06, return_sqrt=False, mode='regularize')

Utility function that returns the inverse of a matrix, with the option to return the square root of the inverse matrix.

Parameters:
  • mat (numpy array with shape [m,m]) – Matrix to be inverted.

  • epsilon (float) – Cutoff for eigenvalues.

  • return_sqrt (bool, optional, default = False) – if True, the square root of the inverse matrix is returned instead

  • mode (str, default='trunc') – Whether to truncate eigenvalues if they are too small or to regularize them by taking the absolute value and adding a small positive constant. trunc leads to truncation, regularize leads to epsilon being added to the eigenvalues after taking the absolute value

Returns:

x_inv – inverse of the original matrix

Return type:

numpy array with shape [m,m]