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_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.
- dim_cols
list[str], optional Names of the columns for channel dimensions
- df_lift_test
- Returns:
pd.DataFrameDataFrame with the scaled lift measurements. Will be same columns and index as the input DataFrame, but with the values scaled.