3.7. kda.svd
3.7.1. SVD and Matrix Solvers
The svd module contains code to calculate steady-state
probabilities using matrix and singular value decomposition methods.
- svd_solver(K, tol=1e-12)[source]
Calculates the steady-state probabilities for an N-state model using singular value decomposition.
- Parameters:
K (ndarray) – Adjacency matrix for the kinetic diagram where each element
kijis the edge weight (i.e. transition rate constant). For example, for a 2-state model withk12=3andk21=4,K=[[0, 3], [4, 0]].tol (float, optional) – Tolerance used for singular value determination. Values are considered singular if they are less than the input tolerance. Default is
1e-12.
- Returns:
state_probs – Array of state probabilities for
Nstates of the form[p1, p2, p3, ..., pN].- Return type:
NumPy array
- matrix_solver(K)[source]
Calculates the steady-state probabilities for an N-state model using a standard matrix solver.
- Parameters:
K (ndarray) – Adjacency matrix for the kinetic diagram where each element
kijis the edge weight (i.e. transition rate constant). For example, for a 2-state model withk12=3andk21=4,K=[[0, 3], [4, 0]].- Returns:
state_probs – Array of state probabilities for
Nstates of the form[p1, p2, p3, ..., pN].- Return type:
ndarray
Functions
Calculates the steady-state probabilities for an N-state model using a standard matrix solver. |
|
|
Calculates the steady-state probabilities for an N-state model using singular value decomposition. |