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

get_pred() exception handling in likelihood class #27

Closed
AmeliaFord353 opened this issue Sep 10, 2023 · 5 comments · Fixed by #33
Closed

get_pred() exception handling in likelihood class #27

AmeliaFord353 opened this issue Sep 10, 2023 · 5 comments · Fixed by #33
Assignees

Comments

@AmeliaFord353
Copy link

In the likelihood class in likelihood.py, there are errors being caused when trying to determine y values for functions, such as divide by zero. These are being produced in get_pred(). Possibly the code needs an exception handling if y cannot be calculated, or a process to drop the problematic functions altogether?

@DeaglanBartlett DeaglanBartlett self-assigned this Sep 20, 2023
@DeaglanBartlett
Copy link
Owner

Can I check whether these are actually being raised as errors or whether you are just getting things printed such as 0.0 cannot be raised to a negative power? If the latter, then this is just from printing the exception (but still catching it) in fitting.test_all. I have removed this print statement in the branch associated with this issue. If the former, can you give me an example of where this causes an error rather than just printing the warning?

@DeaglanBartlett
Copy link
Owner

Having just looked at the output file you sent me, it appears that the issue was being raised in match and not test_all. I've now put the try-except statement you suggested in. Please can you check whether this has fixed your issue?

@AmeliaFord353
Copy link
Author

AmeliaFord353 commented Sep 20, 2023 via email

@DeaglanBartlett
Copy link
Owner

Hi @AmeliaFord353! Did this fix solve your problem?

@AmeliaFord353
Copy link
Author

Yes, thank you!

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

Successfully merging a pull request may close this issue.

2 participants