-
Notifications
You must be signed in to change notification settings - Fork 0
/
graph.html
59 lines (46 loc) · 2.51 KB
/
graph.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<html>
<head>
<title>Identifying Causal Queries</title>
<h1>Causal Identifiability</h1>
<link rel="stylesheet" type="text/css" href="toastr.css">
<link rel="stylesheet" type="text/css" href="graph.css"/>
<script src="fabric.js"></script>
<script src="underscore-min.js"></script>
<script src="jquery-2.1.4.min.js"></script>
<script src="toastr.min.js"></script>
<script src="graph2.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [["$","$"],["\\(","\\)"]]
}
});
</script>
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML-full">
</script>
</head>
<body onload="initialize();">
<div id="instructions">
<p>
This is an implementation of the causal identifiability algorithm described in <a href="http://web.cs.iastate.edu/~jtian/r290-L.pdf">J.Tian, J.Pearl, <i>On the Identification of Causal Effects</i></a> It answers the question, is P(y|do(x)) identifiable in the graph you have drawn. If the query is identifiable then it is possible (in the infinite data limit) to calculate a point estimate for the causal effect on y of an intervention on x from purely observational data .
<ul>
<li>Add nodes by clicking on the canvas</li>
<li>Select nodes by clicking on an existing node </li>
<li>Add directed links by selecting the source node and then clicking on the destination node</li>
<li>Add an undirected link (confounding variable) as above but hold down Cntl before clicking the destination node</li>
<li>Label a node as the intervened on variable by selecting it and pushing the X key</li>
<li>Label a node as the target variable by selecting it and pushing the Y key</li>
<li>Remove a node from the target or intervened on variables by selecting it and pushing the Z key</li>
<li>Remove nodes by selecting them and then hitting delete</li>
<li>Remove an existing edge by adding it again</li>
</ul>
The algorithm is only defined for acyclic graphs. Running it on a graph with cycles results in undefined behaviour.
</p>
</div>
<div id="MathOutput">${}$</div>
<div id="messages"></div>
<div id="canvas"><canvas id="c" width="800" height="600"></canvas></div>
<button id="calc_button" class="myButton">Calculate P(Y|do(X))</button>
</body>
</html>