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

Attempting to calibrate to an empty dataset not caught by input checks of log_posterior_probability #94

Closed
twallema opened this issue Sep 13, 2024 · 1 comment

Comments

@twallema
Copy link
Owner

What I Did

Sliced a dataset I wanted to calibrate a model to (input argument data of log_posterior_probability) in a wrong way making it an empty series:

Series([], Name: Weekly_Hosp, dtype: float64)

This was not caught by the input checks resulting in the following error in pySODM's internals:

  File "/Users/twallema/Documents/academic/github/pySODM/src/pySODM/optimization/objective_functions.py", line 428, in compute_log_likelihood
    interp = out_copy.interp({time_index: df.index.get_level_values(time_index).unique().values}, method="linear")

when trying to calibrate that model.

Proposed fix

Add an appropriate input check for empty datasets.

@twallema
Copy link
Owner Author

twallema commented Oct 3, 2024

Caught by #98

@twallema twallema closed this as completed Oct 3, 2024
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

1 participant