Skip to content

Commit

Permalink
update tutorial to v0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kimmo1019 committed May 14, 2024
1 parent 65533d9 commit 1d7812a
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions docs/source/tutorial_py.ipynb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"id": "a9cf5fca",
"metadata": {},
Expand Down Expand Up @@ -34,7 +33,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Currently use version v0.3.4 of CausalEGM.\n"
"Currently use version v0.4.0 of CausalEGM.\n"
]
}
],
Expand All @@ -44,7 +43,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "31661b36",
"metadata": {},
Expand All @@ -65,7 +63,7 @@
":-:|:-:\n",
"output_dir | Output directory to save the results during the model training. *Default: \".\"*\n",
"dataset | Dataset name for indicating the input data. *Default: \"Mydata\"*\n",
"z_dims | Latent dimensions of the encoder outputs (e(V)_0~3). *Default: [3,3,6,6]*\n",
"z_dims | Latent dimensions of the encoder outputs (e(V)_0~3). *Default: [3,6,3,6]*\n",
"v_dim | Dimension of covariates.\n",
"lr | Learning rate. *Default: 0.0002*\n",
"g_units | Number of units for decoder/generator network G. *Default: [64,64,64,64,64]*.\n",
Expand Down Expand Up @@ -113,7 +111,7 @@
"source": [
"### Examples for loading config parameters \n",
"\n",
"We provide many templates of the hyperparameters in `[path_to_CausalEGM]/src/configs` [folder](https://github.com/SUwonglab/CausalEGM/tree/main/src/configs) for different datasets/settings.\n",
"We provide many templates of the hyperparameters in `CausalEGM/src/configs` [folder](https://github.com/SUwonglab/CausalEGM/tree/main/src/configs) for different datasets/settings.\n",
"\n",
"Users can use `yaml` to load the hyperparameters as a python `dict` object easily.\n"
]
Expand All @@ -128,13 +126,13 @@
"name": "stdout",
"output_type": "stream",
"text": [
"{'dataset': 'Semi_acic', 'output_dir': '.', 'v_dim': 177, 'z_dims': [3, 3, 6, 6], 'lr': 0.0002, 'alpha': 1, 'beta': 1, 'gamma': 10, 'g_d_freq': 5, 'g_units': [64, 64, 64, 64, 64], 'e_units': [64, 64, 64, 64, 64], 'f_units': [64, 32, 8], 'h_units': [64, 32, 8], 'dz_units': [64, 32, 8], 'dv_units': [64, 32, 8], 'save_res': False, 'save_model': False, 'binary_treatment': True, 'use_z_rec': True, 'use_v_gan': True}\n"
"{'dataset': 'Semi_acic', 'output_dir': '.', 'v_dim': 177, 'z_dims': [3, 6, 3, 6], 'lr': 0.0002, 'alpha': 1, 'beta': 1, 'gamma': 10, 'g_d_freq': 5, 'g_units': [64, 64, 64, 64, 64], 'e_units': [64, 64, 64, 64, 64], 'f_units': [64, 32, 8], 'h_units': [64, 32, 8], 'dz_units': [64, 32, 8], 'dv_units': [64, 32, 8], 'save_res': True, 'save_model': False, 'binary_treatment': True, 'use_z_rec': True, 'use_v_gan': True}\n"
]
}
],
"source": [
"import yaml\n",
"params = yaml.safe_load(open('src/configs/Semi_acic.yaml', 'r'))\n",
"params = yaml.safe_load(open('../../src/configs/Semi_acic.yaml', 'r'))\n",
"print(params)"
]
},
Expand Down Expand Up @@ -312,7 +310,7 @@
" [-seed SEED]\r\n",
"\r\n",
"CausalEGM: A general causal inference framework by encoding generative\r\n",
"modeling - v0.3.4\r\n",
"modeling - v0.4.0\r\n",
"\r\n",
"optional arguments:\r\n",
" -h, --help show this help message and exit\r\n",
Expand Down Expand Up @@ -401,14 +399,6 @@
"source": [
"!causalEGM -input test/demo.csv -output_dir ./ -n_iter 100 -startoff 0 -batches_per_eval 50"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f442009f",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down

0 comments on commit 1d7812a

Please sign in to comment.