scale_lift_measurements#

pymc_marketing.mmm.lift_test.scale_lift_measurements(df_lift_test, channel_col, channel_columns, channel_transform, target_transform, dim_cols=None)[source]#

Scale the DataFrame with lift test results to be used in the model.

Parameters:
df_lift_testpd.DataFrame
DataFrame with lift test results with at least the following columns:
  • x: x axis value of the lift test.

  • delta_x: change in x axis value of the lift test.

  • delta_y: change in y axis value of the lift test.

  • sigma: standard deviation of the lift test.

channel_colstr

Name of the channel to scale.

channel_columnslist[str]

List of channel names.

channel_transformCallable[[np.ndarray], np.ndarray]

Function to scale the lift measurements.

target_transformCallable[[np.ndarray], np.ndarray]

Function to scale the target.

dim_colslist[str], optional

Names of the columns for channel dimensions

Returns:
pd.DataFrame

DataFrame with the scaled lift measurements. Will be same columns and index as the input DataFrame, but with the values scaled.