undark-lab/swyft

HDI ValueError in plot.py

CHBKoenders opened this issue · 2 comments

First off, this issue only occurs when the model has high certainty (probably due to overfitting, or too simple a problem).

The problem can occur in lines 123-125. This is because zm[v > levels[i]] can be empty if v has all the mass in one bin. This can be fixed by changing to >=. Maybe even better to do a try catch with a message to increase the number of bins or check for overtraining.

-Kees

bkmi commented

Nice find! I'll take a look.

Stalled? Closing now. Reopen if still an issue.