rates

KMatrix.rates(compartments: list[str], initial_concentration: ndarray) ndarray[source]

The resulting rates of the matrix.

By definition, the eigenvalues of the compartmental model are negative and the rates are the negatives of the eigenvalues, thus the eigenvalues need to be multiplied with -1 to get rates with the correct sign.

Parameters:
  • compartments (list[str]) – Names of compartment used to order the matrix.

  • initial_concentration (np.ndarray) – The initial concentration.