DiscreteVariablesTaskForce / DiscreteSamplingFramework

Python classes describing discrete variable sampling/proposals
Eclipse Public License 2.0
1 stars 0 forks source link

Handle division by zeros #17

Closed navjotk closed 2 years ago

navjotk commented 2 years ago

Currently all our examples have to be wrapped in try/catch blocks for the division by zero errors. Ideally we should handle this internally at the framework level. Cleaner examples/"user code".

alecksphillips commented 2 years ago

These division by zero errors were caused by an error in the decision tree probability calculations that was fixed here.

Since this was an error with domain-level code (as opposed to the base-level), are we best checking calls to domain-level functions (e.g. TreeProposal.eval()) and re-throwing errors?

navjotk commented 2 years ago

Yeah if this was the result of a bug, then this issue is redundant.

When I opened the issue, I thought the div-by-zero was a common feature of the algorithm.

I think we can close this issue if you agree.