Skip to content

Commit

Permalink
reorganized tutorials
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobrunge committed Dec 10, 2022
1 parent e85efe0 commit 4411ef6
Show file tree
Hide file tree
Showing 48 changed files with 2,199 additions and 506 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ Further, Tigramite provides several causal discovery methods that can be used un
| PCMCIplus | Causal stationarity, no hidden variables | Directed lagged links, directed and undirected contemp. links (Time series CPDAG) |
| LPCMCI | Causal stationarity | Time series PAG |

(Also consider the bootstrap-versions of above methods called by *get_bootsrap_of(...)*.)


| Conditional independence test | Assumptions |
|--------|---------------------------------------------------------------------------|
Expand Down
2 changes: 1 addition & 1 deletion tigramite/independence_tests/regressionCI.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from sklearn.linear_model import LinearRegression, LogisticRegression
from sklearn import metrics

from independence_tests_base import CondIndTest
from .independence_tests_base import CondIndTest
# from numba import jit # could make it even faster, also acticate @jit(forceobj=True)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,7 @@
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/jakobrunge/work/code/python_code/tigramite/tigramite_v4/tigramite/tigramite/independence_tests/gpdc_torch.py:33: UserWarning: ('Version mismatch. Installed version of torch', '1.10.2', 'Please install torch>=', '1.11.0')\n",
" warnings.warn(str(e))\n"
]
}
],
"outputs": [],
"source": [
"# Imports\n",
"import numpy as np\n",
Expand Down Expand Up @@ -271,7 +262,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"/home/jakobrunge/work/code/python_code/tigramite/tigramite_v4/tigramite/tigramite/models.py:1659: UserWarning: test_indices - maxlag(predictors) [or tau_max] overlaps with train_indices: Choose test_indices such that there is a gap of max_lag to train_indices!\n",
"/home/jakobrunge/work/code/python_code/tigramite/tigramite_v4/tigramite/tigramite/models.py:1643: UserWarning: test_indices - maxlag(predictors) [or tau_max] overlaps with train_indices: Choose test_indices such that there is a gap of max_lag to train_indices!\n",
" warnings.warn(\"test_indices - maxlag(predictors) [or tau_max] \"\n"
]
}
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,7 @@
"execution_count": 1,
"id": "c998706d",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/jakobrunge/work/code/python_code/tigramite/tigramite_v4/tigramite/tigramite/independence_tests/gpdc_torch.py:33: UserWarning: ('Version mismatch. Installed version of torch', '1.10.2', 'Please install torch>=', '1.11.0')\n",
" warnings.warn(str(e))\n"
]
}
],
"outputs": [],
"source": [
"import numpy as np\n",
"\n",
Expand Down Expand Up @@ -1012,9 +1003,9 @@
"with rule list: [['APR'], ['ER-08'], ['ER-02'], ['ER-01'], ['ER-00-d'], ['ER-00-c'], ['ER-03'], ['R-04'], ['ER-09'], ['ER-10'], ['ER-00-b'], ['ER-00-a']]\n",
"\n",
"APR:\n",
"Marked: (2,-1) -!> (2, 0) ==> (2,-1) --> (2, 0) \n",
"Marked: (1,-1) -!> (1, 0) ==> (1,-1) --> (1, 0) \n",
"Marked: (1,-2) -!> (2, 0) ==> (1,-2) --> (2, 0) \n",
"Marked: (2,-1) -!> (2, 0) ==> (2,-1) --> (2, 0) \n",
"Writing: (1,-1) -!> (1, 0) ==> (1,-1) --> (1, 0) \n",
"Writing: (1,-2) -!> (2, 0) ==> (1,-2) --> (2, 0) \n",
"Writing: (2,-1) -!> (2, 0) ==> (2,-1) --> (2, 0) \n",
Expand Down Expand Up @@ -1063,13 +1054,7 @@
"R-04:\n",
"Found nothing\n",
"\n",
"ER-09:\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"ER-09:\n",
"Found nothing\n",
"\n",
"ER-10:\n",
Expand Down Expand Up @@ -1284,10 +1269,10 @@
"with rule list: [['APR'], ['ER-08'], ['ER-02'], ['ER-01'], ['ER-00-d'], ['ER-00-c'], ['ER-03'], ['R-04'], ['ER-09'], ['ER-10'], ['ER-00-b'], ['ER-00-a']]\n",
"\n",
"APR:\n",
"Marked: (2,-1) -!> (2, 0) ==> (2,-1) --> (2, 0) \n",
"Marked: (1,-1) -!> (1, 0) ==> (1,-1) --> (1, 0) \n",
"Marked: (1,-2) -!> (2, 0) ==> (1,-2) --> (2, 0) \n",
"Marked: (0,-1) -!> (0, 0) ==> (0,-1) --> (0, 0) \n",
"Marked: (2,-1) -!> (2, 0) ==> (2,-1) --> (2, 0) \n",
"Writing: (0,-1) -!> (0, 0) ==> (0,-1) --> (0, 0) \n",
"Writing: (1,-1) -!> (1, 0) ==> (1,-1) --> (1, 0) \n",
"Writing: (1,-2) -!> (2, 0) ==> (1,-2) --> (2, 0) \n",
Expand Down Expand Up @@ -1403,13 +1388,7 @@
"ER-00-c:\n",
"Found nothing\n",
"\n",
"ER-03:\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"ER-03:\n",
"Found nothing\n",
"\n",
"R-04:\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,7 @@
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/jakobrunge/work/code/python_code/tigramite/tigramite_v4/tigramite/tigramite/independence_tests/gpdc_torch.py:33: UserWarning: ('Version mismatch. Installed version of torch', '1.10.2', 'Please install torch>=', '1.11.0')\n",
" warnings.warn(str(e))\n"
]
}
],
"outputs": [],
"source": [
"# Imports\n",
"import numpy as np\n",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tutorials/dataset_challenges/figures/ts_DAG.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tutorials/dataset_challenges/figures/ts_DMAG.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tutorials/dataset_challenges/figures/ts_DPAG.png
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,7 @@
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/jakobrunge/work/code/python_code/tigramite/tigramite_v4/tigramite/tigramite/independence_tests/gpdc_torch.py:33: UserWarning: ('Version mismatch. Installed version of torch', '1.10.2', 'Please install torch>=', '1.11.0')\n",
" warnings.warn(str(e))\n"
]
}
],
"outputs": [],
"source": [
"# Imports\n",
"import numpy as np\n",
Expand Down Expand Up @@ -495,13 +486,7 @@
" Y = [(1, 0)]\n",
" Z = [(1, -1), (0, -1)]\n",
" extraZ = []\n",
" with missing values = 999.0 removed\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
" with missing values = 999.0 removed\n",
" val = -0.013 | pval = 0.90014 \n",
" Subset 0: ($X^1$ -1) ($X^0$ -1) gives pval = 0.90014 / val = -0.013\n",
" Non-significance detected.\n",
Expand Down Expand Up @@ -920,13 +905,7 @@
" Y = [(1, 0)]\n",
" Z = [(1, -1), (0, -1), (0, -3)]\n",
" extraZ = []\n",
" with missing values = 999.0 removed\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
" with missing values = 999.0 removed\n",
" val = 0.098 | pval = 0.34941 \n",
"\n",
" link ($X^1$ -1) --> $X^1$ (4/8):\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,7 @@
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/jakobrunge/work/code/python_code/tigramite/tigramite_v4/tigramite/tigramite/independence_tests/gpdc_torch.py:33: UserWarning: ('Version mismatch. Installed version of torch', '1.10.2', 'Please install torch>=', '1.11.0')\n",
" warnings.warn(str(e))\n"
]
}
],
"outputs": [],
"source": [
"import numpy as np\n",
"np.random.seed(42)\n",
Expand Down
383 changes: 0 additions & 383 deletions tutorials/tigramite_tutorial_linear_causal_effects_mediation.ipynb

This file was deleted.

0 comments on commit 4411ef6

Please # to comment.