Build the reversible rate matrix K or symmetric rate matrix, S, from the free parameters, theta
Parameters: | exptheta : array
n : int
inds : array, optional (default=None)
which : {‘S’, ‘K’}
out : [output], array shape=(n, n)
|
---|
Notes
The last n elements of exptheta must be nonzero, since they parameterize the equilibrium populations, so even with the sparse parameterization, len(u) must be greater than or equal to n.
With the sparse parameterization, the following invariant holds. If inds = indices_of_nonzero_elements(exptheta), then build_ratemat(exptheta, n, None) == build_ratemat(exptheta[inds], n, inds)