lift_test#

Adding lift tests as observations of saturation function.

This provides the inner workings of MMM.add_lift_test_measurements method. Use that method directly while working with the MMM class.

Functions

add_lift_measurements_to_likelihood_from_saturation(...)

Add lift measurements to the likelihood from a saturation transformation.

add_saturation_observations(df_lift_test, ...)

Add saturation observations to the likelihood of the model.

assert_is_subset(required, available)

Check if the available set is a subset of the required set.

assert_monotonic(delta_x, delta_y)

Check if the lift test results satisfy the increasing assumption.

create_time_varying_saturation(saturation, ...)

Return function and variable mapping that use a time-varying variable.

create_variable_indexer(model, indices)

Create a function to index variables in the model.

exact_row_indices(df, model)

Get indices in the model for each row in the DataFrame.

scale_channel_lift_measurements(...)

Scale the lift measurements for a specific channel.

scale_lift_measurements(df_lift_test, ...)

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

scale_target_for_lift_measurements(target, ...)

Scale the target for the lift measurements.

Exceptions

MissingValueError(missing_values, ...)

Error when values are missing from a required set.

NonMonotonicError

Data is not monotonic.

UnalignedValuesError(unaligned_values)

Raised when some values are not aligned.