Replies: 1 comment
-
| Given a matrix A, we define matrix power to be A^n, while matrix exponentiation is defined as e^A, where e can be any base. They are not the same operation. You are probably looking for matrix power in your case. (Maybe I'm missing some deeper graph-theoretic insight between power and exponentiation though.) | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
I'm carrying out a vectorized calculation of the connected components of a graph from its adjacency matrix. Now, the matrix power$A^n$  records the number of paths between nodes, and to check connectivity it is sufficient to check $A^{n-1}$  (where n is the dimension of the adjacency matrix), but in the end I'm going to be applying some kind of thresholding function (soft or hard), so I could also do this by thresholding the matrix exponential, $\exp(A)$ . The matrices I'm working with will never be larger than 100 by 100 and will typically be sparse.
Computing the matrix power seems like it would be more efficient, but I wonder if there are any practical reasons to compute the matrix exponential instead (e.g. if
jax.scipy.linalg.expmand/or its gradient is more efficient or better-behaved thanjax.numpy.linalg.expmfor algorithmic reasons that wouldn't be obvious to me as a biochemist.Beta Was this translation helpful? Give feedback.
All reactions