lift_test_indices#

pymc_marketing.mmm.lift_test.lift_test_indices(df_lift_test, model)[source]#

Get the indices of the lift test results in the model.

Assumes any column in the DataFrame is a coordinate in the model with the same name.

Parameters:
  • df_lift_test (pd.DataFrame) – DataFrame with lift test results.

  • model (pm.Model) – PyMC model with all the coordinates in the DataFrame.

Returns:

Dictionary of indices for the lift test results in the model.

Return type:

dict[str, np.ndarray]

Raises:

MissingLiftTestError – If some lift test values are not in the model.