calculate_lift_measurements_from_curve#

pymc_marketing.mmm.lift_test.calculate_lift_measurements_from_curve(x_before, x_after, saturation_curve, pt=<module 'pytensor.tensor' from '/home/docs/checkouts/readthedocs.org/user_builds/pymc-marketing/envs/stable/lib/python3.10/site-packages/pytensor/tensor/__init__.py'>)[source]#

Calculate the lift measurements at two spends.

Parameters:
  • x_before (npt.NDArray[float]) – Array of x before the change.

  • x_after (npt.NDArray[float]) – Array of x after the change.

  • saturation_curve (Callable[[npt.NDArray[float]], npt.NDArray[float]]) – Function that takes spend and returns saturation.

  • pt (tensor module, optional. Default is pytensor.tensor.)

Returns:

Array of lift measurements based on a given saturation curve

Return type:

npt.NDArray[float]