Parameters

class pypomp.core.parameters.PompParameters(theta: ThetaInput, logLik: np.ndarray | None = None, estimation_scale: bool = False)[source]

Bases: ParameterSet

Manages parameters for a standard Pomp model. Internal storage is a list of dictionaries.

Parameters:
  • theta (ThetaInput) – Parameters for the model. Accepts: - A single dictionary: dict[str, Numeric] - A list of dictionaries: list[dict[str, Numeric]] - An existing PompParameters object

  • logLik (np.ndarray, optional) – A numpy array of log-likelihoods.

  • estimation_scale (bool, optional) – Whether the parameters are in the estimation scale. Defaults to False.

Methods

logLik

to_jax_array(param_names, **kwargs)

Convert to JAX array matching the order of param_names.

to_jax_array_canonical()

num_replicates()

Returns the number of parameter replicates (J).

num_params()

subset(indices)

Returns a new ParameterSet containing only the specified replicate indices.

get_param_names()

Returns the list of parameter names contained in this set.

to_list()

Returns the internal list of dictionaries.

transform(par_trans[, direction])

Transform the parameters to or from the estimation parameter space.

prune([n, refill])

Replace internal parameter sets with the top n based on stored log-likelihoods.

merge(*param_objs)

Merge replications from an arbitrary number of PompParameters objects into a single PompParameters object.

class pypomp.core.parameters.PanelParameters(theta: dict[str, DataFrame | None] | list[dict[str, DataFrame | None]] | PanelParameters | None, logLik_unit: ndarray | None = None, estimation_scale: bool = False)[source]

Bases: ParameterSet

Manages parameters for PanelPomp models. Internal storage is a list of dictionaries, always containing “shared” and “unit_specific” keys mapping to DataFrames (which may be empty).

Parameters:
  • theta (PanelParameters | dict | list, optional) – Parameters for the panel model. Accepts: - A single dictionary with “shared” and “unit_specific” keys. - A list of such dictionaries. - An existing PanelParameters object.

  • logLik_unit (np.ndarray, optional) – A numpy array of unit-specific log-likelihoods.

  • estimation_scale (bool, optional) – Whether the parameters are in the estimation scale. Defaults to False.

Methods

logLik

logLik_unit

theta

num_replicates()

Returns the number of parameter replicates (J).

get_param_names()

Returns the list of parameter names contained in this set.

get_shared_param_names()

get_unit_param_names()

get_unit_names()

Return the list of unit names from the first replicate's unit_specific DataFrame.

subset(indices)

Returns a new ParameterSet containing only the specified replicate indices.

to_jax_array(param_names[, unit_names])

Converts the parameters to a JAX array suitable for model functions.

transform(par_trans[, direction])

prune([n, refill])

mix_and_match()

Sorts unit-specific parameters and shared parameters in descending order of unit log-likelihood and shared log-likelihood, respectively, then combines them to form new parameter sets.