nskinetics.doe.fim.optimal_design#
- nskinetics.doe.fim.optimal_design(rxn_sys, param_keys, candidate_initials, t_eval, spike_options=None, output_idx=None, top_n=5, epsilon=0.0001, show_fail_warnings=False, show_output=False, timeout_solve_ivp=0.5)[source]#
Perform design of experiments by exhaustively evaluating combinations of initial concentrations and optional spike conditions, returning those that maximize parameter identifiability.
- Parameters:
rxn_sys (ReactionSystem) – The reaction system to be evaluated.
param_keys (list of str) – List of parameter names to be identified.
candidate_initials (dict) – Dictionary mapping species names to lists of candidate initial concentrations. Example: {‘E’: [0.1, 1.0], ‘S’: [0.5, 2.0]}
t_eval (array-like) – Time points at which to simulate the system.
spike_options (dict or None, optional) – Dictionary mapping species to lists of possible spike values (or None for no spikes). Example: {‘S’: [0.5, 1.0]}.
output_idx (list of int or None, optional) – Indices of species that are experimentally measured (default is all).
top_n (int, optional) – Number of top experimental designs to return based on D-optimality (default is 5).
timeout_solve_ivp (float, int, or None, optional) – Enforce timeout of scipy.integrate.solve_ivp when it exceeds this value. Creates and passes a timeout_function as an event to scipy.integrate.solve_ivp. Defaults to 0.5 (seconds).
- Returns:
top_designs –
- Each dict contains:
’y0’ : ndarray, initial concentrations ‘spikes’ : dict or None, spike specification ‘FIM’ : ndarray, Fisher Information Matrix ‘score’ : float, D-optimality score
- Return type: