nskinetics.doe.fim.get_sensitivities#
- nskinetics.doe.fim.get_sensitivities(rxn_sys, t_eval, y0, param_inds, epsilon=0.0001, spikes=None, output_idx=None)[source]#
Compute finite-difference sensitivities of ReactionSystem outputs with respect to kinetic parameters.
- Parameters:
rxn_sys (ReactionSystem) – The reaction system to be evaluated.
t_eval (array-like) – Time points at which to evaluate the solution.
y0 (array-like) – Initial concentrations of all species.
param_inds (list of str) – List of parameter indices to compute sensitivities for.
epsilon (float, optional) – Relative perturbation size for finite difference (default is 1e-4).
spikes (dict or None, optional) – Dictionary specifying species and corresponding spike amounts (optional).
output_idx (list of int or None, optional) – Indices of species whose concentrations are observed/measured. If None, all are used.
- Returns:
sensitivities – Flattened sensitivity matrix, where n_obs = len(t_eval) * len(output_idx), and n_params = len(param_inds).
- Return type:
ndarray of shape (n_obs, n_params)