We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Using the time_varying_media=True parameter requires that the date is provided in the df_lift_test DataFrame.
time_varying_media=True
date
df_lift_test
Example to produce the error:
import pandas as pd from pymc_marketing.mmm import ( GeometricAdstock, LogisticSaturation, MMM, ) data_url = "https://raw.githubusercontent.com/pymc-labs/pymc-marketing/main/data/mmm_example.csv" data = pd.read_csv(data_url, parse_dates=["date_week"]) mmm = MMM( adstock=GeometricAdstock(l_max=8), saturation=LogisticSaturation(), date_column="date_week", channel_columns=["x1", "x2"], control_columns=[ "event_1", "event_2", "t", ], time_varying_media=True, ) X = data.drop("y", axis=1) y = data["y"] mmm.build_model(X, y) # This is the lift test format with time_varying_media=False df_lift_test = pd.DataFrame( { "channel": ["x1"], "x": [1], "delta_x": [0.1], "delta_y": [0.1], "sigma": [0.05], } ) mmm.add_lift_test_measurements(df_lift_test) # MissingValueError: "The value ['date'] is missing of the required ['date', 'channel']"
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Using the
time_varying_media=True
parameter requires that thedate
is provided in thedf_lift_test
DataFrame.Example to produce the error:
The text was updated successfully, but these errors were encountered: