Issue with em_infer
Please follow the general troubleshooting steps first:
Are you running the latest
- Do you observe the problem with the current git version?
Did you compile
Hi, I have an issue with the em_infer function. Most of the time, when I create a SBM with 2 well separated clusters, the results returned by EM_infer cluster all the points in one cluster. Moreover, the verbose shows huge values.
I am currently using ubuntu 18.04.5 LTS but I observed the same issue with ubuntu 20.04. And I am using python 3.8 with the graph-tool version 2.33.
Here is the code I used:
from graph_tool.all import * import numpy as np P2 = np.array([[100*99*0.8,100*100*0.02],[100*100*0.02,100*99*0.8]]) lab_sbm = np.zeros(200) lab_sbm[100:] = 1 g = generate_sbm(lab_sbm,P2) state = EMBlockState(g,B=2) delta, niter = em_infer(state,verbose=True) state.get_MAP().get_array()
And here is what I observe: