D-分离#

DAGs中d-分离的测试算法。

d-separation is a test for conditional independence in probability distributions that can be factorized using DAGs. It is a purely graphical test that uses the underlying graph and makes no reference to the actual distribution parameters. See [1] for a formal definition.

该实现基于中提出的概念上简单的线性时间算法 [2]. 请参阅 [3], [4] 有几个替代算法。

实例#

>>>
>>> # HMM graph with five states and observation nodes
... g = nx.DiGraph()
>>> g.add_edges_from(
...     [
...         ("S1", "S2"),
...         ("S2", "S3"),
...         ("S3", "S4"),
...         ("S4", "S5"),
...         ("S1", "O1"),
...         ("S2", "O2"),
...         ("S3", "O3"),
...         ("S4", "O4"),
...         ("S5", "O5"),
...     ]
... )
>>>
>>> # states/obs before 'S3' are d-separated from states/obs after 'S3'
... nx.d_separated(g, {"S1", "S2", "O1", "O2"}, {"S4", "S5", "O4", "O5"}, {"S3"})
True

工具书类#

1

Pearl,J.(2009年)。因果关系。剑桥:剑桥大学出版社。

2

达威奇,A.(2009年)。贝叶斯网络建模与推理。剑桥:剑桥大学出版社。

3

Shachter,R.D.(1998)。贝叶斯-球:理性消遣(用于确定信念网络和影响图中的无关性和必备信息)。见,第十四届人工智能不确定性会议论文集(pp.480-487)。美国加利福尼亚州旧金山:摩根考夫曼出版公司

4

Koller,D.和Friedman,N.(2009年)。概率图形模型:原理和技术。麻省理工学院出版社。

d_separated(G, x, y, z)

返回是否设置节点 xy 由分隔 z .