Skip to content

Commit

Permalink
Update comments a little bit
Browse files Browse the repository at this point in the history
  • Loading branch information
kunwuz committed Dec 28, 2021
1 parent cf08150 commit 8443c49
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion causallearn/search/ConstraintBased/CDNOD.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def cdnod_alg(data, alpha, indep_test, stable, uc_rule, uc_priority, background_
Returns
-------
cg : a CausalGraph object, where cg.G.graph[j,i]=1 and cg.G.graph[i,j]=-1 indicates i --> j ,
cg : a CausalGraph object, where cg.G.graph[j,i]=1 and cg.G.graph[i,j]=-1 indicate i --> j ,
cg.G.graph[i,j] = cg.G.graph[j,i] = -1 indicates i --- j,
cg.G.graph[i,j] = cg.G.graph[j,i] = 1 indicates i <-> j.
Expand Down
6 changes: 3 additions & 3 deletions causallearn/search/ConstraintBased/FCI.py
Original file line number Diff line number Diff line change
Expand Up @@ -787,9 +787,9 @@ def fci(dataset, independence_test_method=fisherz, alpha=0.05, depth=-1, max_pat
graph.graph[j,i]=1 and graph.graph[i,j]=2 indicates i o-> j.
edges : list
Contains graph's edges properties.
If an edge.properties have the Property dd, then it means there is no latent confounder. Otherwise,
there is possibly latent confounder.
If an edge.properties have the Property nl, then it is definitely direct. Otherwise,
If edge.properties have the Property 'dd', then there is no latent confounder. Otherwise,
there might be latent confounders.
If edge.properties have the Property nl, then it is definitely direct. Otherwise,
it is possibly direct.
'''

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,6 @@ For detailed usage, please kindly refer to its `usage example <https://github.co

Returns
-------------------
**cg** : a CausalGraph object, where cg.G.graph[j,i]=1 and cg.G.graph[i,j]=-1 indicates i --> j; cg.G.graph[i,j] = cg.G.graph[j,i] = -1 indicates i --- j; cg.G.graph[i,j] = cg.G.graph[j,i] = 1 indicates i <-> j.
**cg** : a CausalGraph object, where cg.G.graph[j,i]=1 and cg.G.graph[i,j]=-1 indicate i --> j; cg.G.graph[i,j] = cg.G.graph[j,i] = -1 indicates i --- j; cg.G.graph[i,j] = cg.G.graph[j,i] = 1 indicates i <-> j.

.. [1] Huang, B., Zhang, K., Zhang, J., Ramsey, J. D., Sanchez-Romero, R., Glymour, C., & Schölkopf, B. (2020). Causal Discovery from Heterogeneous/Nonstationary Data. J. Mach. Learn. Res., 21(89), 1-53.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Returns
-------------------
**graph**: a CausalGraph object, where graph.graph[j,i]=1 and graph.graph[i,j]=-1 indicates i --> j; graph.graph[i,j] = graph.graph[j,i] = -1 indicates i --- j; graph.graph[i,j] = graph.graph[j,i] = 1 indicates i <-> j; graph.graph[j,i]=1 and graph.graph[i,j]=2 indicates i o-> j.

**edges**: list. Contains graph's edges properties. If an edge.properties have the Property dd, then it means there is no latent confounder. Otherwise, there is possibly latent confounder. If an edge.properties have the Property nl, then it is definitely direct. Otherwise, it is possibly direct.
**edges**: list. Contains graph's edges properties. If edge.properties have the Property 'dd', then there is no latent confounder. Otherwise, there might be latent confounders. If edge.properties have the Property 'nl', then it is definitely direct. Otherwise, it is possibly direct.


.. [1] Spirtes, P., Meek, C., & Richardson, T. (1995, August). Causal inference in the presence of latent variables and selection bias. In Proceedings of the Eleventh conference on Uncertainty in artificial intelligence (pp. 499-506).
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ For detailed usage, please kindly refer to its `usage example <https://github.co

Returns
-------------------
**cg** : a CausalGraph object, where cg.G.graph[j,i]=1 and cg.G.graph[i,j]=-1 indicates i --> j; cg.G.graph[i,j] = cg.G.graph[j,i] = -1 indicates i --- j; cg.G.graph[i,j] = cg.G.graph[j,i] = 1 indicates i <-> j.
**cg** : a CausalGraph object, where cg.G.graph[j,i]=1 and cg.G.graph[i,j]=-1 indicate i --> j; cg.G.graph[i,j] = cg.G.graph[j,i] = -1 indicate i --- j; cg.G.graph[i,j] = cg.G.graph[j,i] = 1 indicates i <-> j.

.. [1] Spirtes, P., Glymour, C. N., Scheines, R., & Heckerman, D. (2000). Causation, prediction, and search. MIT press.
.. [2] Tu, R., Zhang, C., Ackermann, P., Mohan, K., Kjellström, H., & Zhang, K. (2019, April). Causal discovery in the presence of missing data. In The 22nd International Conference on Artificial Intelligence and Statistics (pp. 1762-1770). PMLR.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ and n_features is the number of features.

Returns
-------------------
- **Record['G']**: learned causal graph, where Record['G'].graph[j,i]=1 and Record['G'].graph[i,j]=-1 indicates i --> j; Record['G'].graph[i,j] = Record['G'].graph[j,i] = -1 indicates i --- j.
- **Record['G']**: learned causal graph, where Record['G'].graph[j,i]=1 and Record['G'].graph[i,j]=-1 indicate i --> j; Record['G'].graph[i,j] = Record['G'].graph[j,i] = -1 indicates i --- j.

- **Record['update1']**: each update (Insert operator) in the forward step.

Expand Down

0 comments on commit 8443c49

Please sign in to comment.