Error Loading a XMLgraph,
Closed this issue · 1 comments
cruyffturn commented
from pgmpy.readwrite import ProbModelXMLReader
#reader_string = ProbModelXMLReader('../files/example.pgmx')
reader_string = ProbModelXMLReader('BN_alarm.pgmx')
model = reader_string.get_model()
File "C:\Users\Deniz\Anaconda3\envs\tf_ed\lib\site-packages\pgmpy\readwrite\ProbModelXML.py", line 1058, in get_model
model.edge[edge[0]][edge[1]][prop_name] = prop_value
AttributeError: 'BayesianModel' object has no attribute 'edge'
cruyffturn commented
The solution which solves the problem is:
-Downgrading the Networkx from 2.1 to 1.11
It's inspired by ankurankan's answer to another post which has a different Networkx related problem.