pypomp.core.par_trans.ParTrans.transform_panel_traces¶
- ParTrans.transform_panel_traces(shared_traces: ndarray | None, unit_traces: ndarray | None, shared_param_names: list[str], unit_param_names: list[str], unit_names: list[str], direction: Literal['to_est', 'from_est']) tuple[ndarray | None, ndarray | None][source]¶
Transform panel traces from estimation space to natural space.
For panel models, shared and unit-specific parameters may be interdependent in the transformation, so they need to be transformed together.
- Parameters:
shared_traces – Array of shared parameter traces, shape (n_reps, n_iters, n_shared+1) where [:, :, 0] is loglik and [:, :, 1:] are shared params
unit_traces – Array of unit-specific parameter traces, shape (n_reps, n_iters, n_spec+1, n_units) where [:, :, 0, :] is per-unit loglik and [:, :, 1:, :] are unit-specific params
shared_param_names – List of shared parameter names
unit_param_names – List of unit-specific parameter names
unit_names – List of unit names
direction – Direction of transformation (“to_est” or “from_est”)
- Returns:
Tuple of (transformed_shared_traces, transformed_unit_traces) with same shapes as inputs