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_df
pd.DataFrame New dataset reflecting changes.
- new_utility_equations
list[str] orNone Updated utility specifications (triggers refit if provided).
- new_consideration_instruments
ConsiderationInstrumentsorNone Updated consideration instruments. If None, reuses current. When
new_choice_dfhas a different number of rows from the training data, this must be provided with matching shape.- fit_kwargs
dictorNone Keyword arguments for sampling if refitting.
- random_seed
int, optional Random seed for posterior-predictive sampling in the no-refit branch. When
new_utility_equationsis provided (refit branch), the seed passed infit_kwargsgoverns sampling.
- new_choice_df
- Returns:
az.InferenceDataPosterior or predictive distribution under intervention.