Skip to content

Commit

Permalink
Add new signalling example (and remove old ones)
Browse files Browse the repository at this point in the history
  • Loading branch information
brettc committed Sep 29, 2015
1 parent 0e9073a commit 9067cc5
Show file tree
Hide file tree
Showing 6 changed files with 1,110 additions and 1,102 deletions.
92 changes: 91 additions & 1 deletion arnaud.ipynb
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# A simple intro to using causalinfo\n",
"\n",
"## Setup\n",
"\n",
"We need to import the library, and a few other useful things for displaying the graphs."
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand Down Expand Up @@ -688,7 +699,8 @@
"cell_type": "code",
"execution_count": 33,
"metadata": {
"collapsed": false
"collapsed": false,
"scrolled": true
},
"outputs": [
{
Expand All @@ -709,6 +721,84 @@
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Note the last calculation is *not* the same as above (it was 0.0). That is because the joint distribution is different under interventions, as we can see..."
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>S</th>\n",
" <th>A</th>\n",
" <th>B</th>\n",
" <th>Pr</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>0.25</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>0.25</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0.25</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>0.25</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
"<causalinfo.network.FullJoint at 0x107d0d350>"
]
},
"execution_count": 36,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"j_do"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
Expand Down
Loading

0 comments on commit 9067cc5

Please sign in to comment.