ConsiderationSetMixedLogit.apply_intervention#

ConsiderationSetMixedLogit.apply_intervention(new_choice_df, new_utility_equations=None, new_consideration_instruments=None, fit_kwargs=None, random_seed=None)[source]#

Apply intervention, optionally updating consideration instruments.

Parameters:
new_choice_dfpd.DataFrame

New dataset reflecting changes.

new_utility_equationslist[str] or None

Updated utility specifications (triggers refit if provided).

new_consideration_instrumentsConsiderationInstruments or None

Updated consideration instruments. If None, reuses current. When new_choice_df has a different number of rows from the training data, this must be provided with matching shape.

fit_kwargsdict or None

Keyword arguments for sampling if refitting.

random_seedint, optional

Random seed for posterior-predictive sampling in the no-refit branch. When new_utility_equations is provided (refit branch), the seed passed in fit_kwargs governs sampling.

Returns:
az.InferenceData

Posterior or predictive distribution under intervention.