scale_lift_measurements#
- pymc_marketing.mmm.lift_test.scale_lift_measurements(df_lift_test, channel_col, channel_columns, channel_transform, target_transform)[source]#
Scale the DataFrame with lift test results to be used in the model.
- Parameters:
df_lift_test (pd.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_col (str) – Name of the channel to scale.
channel_columns (list[str]) – List of channel names.
channel_transform (Callable[[np.ndarray], np.ndarray]) – Function to scale the lift measurements.
target_transform (Callable[[np.ndarray], np.ndarray]) – Function to scale the target.
- Returns:
DataFrame with the scaled lift measurements. Will be same columns and index as the input DataFrame, but with the values scaled.
- Return type:
pd.DataFrame