Closed bokveizen closed 4 months ago
thanks for this @bokveizen - right now some tests are failing due to unrelated reasons, once I have a fix for that I'll have a look at this. but at a glance, it seems perfect
if you are still interested, you could merge dev into this branch, and i believe tests will pass now
Reference Issues/PRs
See Issue #1055
What does this implement/fix? Briefly explain your changes.
Expected Behavior
Any size-1 block should just have zero probability.
Actual Behavior
In
sbm_estimators.py
,_calculate_block_p
calls_calculate_p
, which divides zero whenblock.size = 0
. This can happen when some block has size one andloops=False
is used.Adding
before Line 519 of
graspologic/graspologic/models/sbm_estimators.py
should do the trick.