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 (
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_transform (
Callable[[ndarray],ndarray]) – Function to scale the lift measurements.target_transform (
Callable[[ndarray],ndarray]) – Function to scale the target.dim_cols (
list[str] |None) – Names of the columns for channel dimensions
- Return type:
pd.DataFrame- Returns:
DataFrame with the scaled lift measurements. Will be same columns and index as the input DataFrame, but with the values scaled.