Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

National level model summary with holdout group: holdout_id indexing error #408

Open
j6baptiste opened this issue Jan 2, 2025 · 1 comment

Comments

@j6baptiste
Copy link
Collaborator

Hi, I am running into an indexing error while generating an HTML summary for a national model trained with a single knot and an holdout group given as a list of booleans of dimension (n_times,).

The error happens on that line of the source code:

holdout_id = holdout_id[:, time_mask]

When running:

mmm_summarizer.output_model_results_summary(f'meridian_output{model_suffix}.html', filepath, start_date, end_date)

And raises:

IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed

According to the documentation the expected shape for holdout_id in the model specifications for a national level model is (n_times,). But the indexing in the source code is always 2 dimensional.

Could someone provide guidance on how to avoid this issue?

(I can provide traceback / more details about the code if necessary)

@cpulavarthi
Copy link
Collaborator

Hello @j6baptiste,

Thank you for bringing this issue to our attention. This bug has been resolved in commit #307fa31 and your code should now work without any errors.

Feel free to reach out if you have any queries regarding Meridian.

Thank you

Google Meridian Support Team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants