docs: def convertToProbabilityMatrix(self, Q):
          """
          Converts the initial matrix to a probability matrix
          We calculate P = I + Q/l, with l the largest diagonal element.
          Even if Q is already a probability matrix, this step helps for numerical stability. 
          By adding a small probability on the diagonal (0.00001), periodicity can be prevented.
          """
          rowSums             = Q.sum(axis=1).getA1()
          l                   = np.max(rowSums)*1.00001
          diagonalElements    = 1.-rowSums/l
          idxRange            = np.arange(Q.shape[0])
          Qdiag               = coo_matrix((diagonalElements,(idxRange,idxRange)),shape=Q.shape).tocsr()
          return Qdiag+Q.multiply(1./l)