python 贝叶斯网络

逛知乎看到的,老是忘记,记一下:

import networkx as nx
graph = nx.from_numpy_matrix(Matrix)

networkx自带函数将邻接矩阵转为网络图

你可能感兴趣的:(数据结构和算法,python,python,贝叶斯)