Pgmpy library Memory Error problem in python

10 views Asked by At

I recently tried using the pgmpy library for a prediction task in Markov Ramdom Field. The network has 51 nodes and 76 edges, and I have calculated the potential function for each edge. I first tried the Belief Propagation method. Every time I tried to get a map_query for more than 31 unknown nodes, it will return a out of memory error. When the number of nodes comes up to 40 or more, even the float64 data is unsufficient. Then I tried the GibbsSampling method. After I defined the MRF, I tried to transfer to the GibbsSampling method by the code: gibbs = GibbsSampling(G). I would also meet the memory error. My question is: Is the pgmpy library struggling to handle slightly larger networks or is there something wrong with my code? If it's a library problem, what other approach should I take?

I have tried the Belief Propagation method and GibbsSampling method in pgmpy library. I hope to get a method for predicting the state of unknown nodes in a Markov Random Filed.

0

There are 0 answers