traveler.steps.simple_choice.analytic_share_loss_grad#
- simple_choice.analytic_share_loss_grad(store, *, choosers=None, param=None, target_shares, scale=1.0)[source]#
Differentiate analytic-share loss with respect to parameters.
- Parameters:
store (AbstractStore) – Store containing chooser and supporting model data.
choosers (WorkingTable or None, optional) – Choosers to evaluate. When omitted, use the configured table.
param (dict[str, float] or None, optional) – Utility coefficients. When omitted, use the model’s parameters.
target_shares (dict or jax.Array) – Target share for each configured alternative.
scale (float, optional) – Multiplier applied to the summed squared error.
- Returns:
Gradient pytree with the same structure as
param.- Return type: