Skip to content
New issue

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

time_varying_media and calibration #1312

Open
malitsadok1 opened this issue Dec 23, 2024 · 2 comments · May be fixed by #1316
Open

time_varying_media and calibration #1312

malitsadok1 opened this issue Dec 23, 2024 · 2 comments · May be fixed by #1316
Labels
bug Something isn't working lift tests MMM TVPs Related to time varying parameters
Milestone

Comments

@malitsadok1
Copy link

I am working on adding a lift test to my MMM model and enabling time_varying_media=True.

For the lift test, I used the method mmm.add_lift_test_measurements(df_lift_test) and added the date column to df_lift_test in two different formats:

  1. "date": [pd.to_datetime("2024-08-01")]
  2. "date": ["2024-08-01"]

Despite trying both formats, I am still encountering the following error:

MissingValueError                         Traceback (most recent call last)
<cell line: 1>()
----> 1 mmm.add_lift_test_measurements(df_lift_test)

3 frames
/usr/local/lib/python3.10/dist-packages/pymc_marketing/mmm/lift_test.py in assert_is_subset(required, available)
    248     missing = required - available
    249     if missing:
--> 250         raise MissingValueError(list(missing), list(required))
    251 
    252 

MissingValueError: "The value ['date'] is missing from the required ['channel', 'date']"

Thank you in advance for your assistance!

@wd60622 wd60622 added MMM lift tests TVPs Related to time varying parameters and removed Needs Triage labels Dec 23, 2024
@wd60622
Copy link
Contributor

wd60622 commented Dec 23, 2024

Ive indentified that the df_lift_test_scaled no longer has the date column which causes error. This needs to either be kept while scaling or added back on in case of time varying media

Would you want to make a PR @malitsadok1 ?

@wd60622 wd60622 added the bug Something isn't working label Dec 23, 2024
@malitsadok1
Copy link
Author

sure

@wd60622 wd60622 linked a pull request Dec 27, 2024 that will close this issue
13 tasks
@wd60622 wd60622 added this to the 0.11.0 milestone Dec 29, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working lift tests MMM TVPs Related to time varying parameters
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants