You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- ":ref:`kci <Kernel-based conditional independence (KCI) test and independence test>`": kernel-based conditional independence test. (As a kernel method, its complexity is cubic in the sample size, so it might be slow if the same size is not small.)
**stable**: run stabilized skeleton discovery if True (default = True).
40
+
**stable**: run stabilized skeleton discovery if True. Default: True.
38
41
39
-
**uc_rule**: how unshielded colliders are oriented.
42
+
**uc_rule**: how unshielded colliders are oriented. Default: 0.
40
43
- 0: run uc_sepset.
41
44
- 1: run maxP. Orient an unshielded triple X-Y-Z as a collider with an aditional CI test.
42
45
- 2: run definiteMaxP. Orient only the definite colliders in the skeleton and keep track of all the definite non-colliders as well.
43
46
44
-
**uc_priority**: rule of resolving conflicts between unshielded colliders.
47
+
**uc_priority**: rule of resolving conflicts between unshielded colliders. Default: 2.
45
48
- -1: whatever is default in uc_rule.
46
49
- 0: overwrite.
47
50
- 1: orient bi-directed.
@@ -51,10 +54,17 @@ and n_features is the number of features.
51
54
52
55
**mvpc**: use missing-value PC or not. Default (and suggested for CDNOD): False.
53
56
54
-
**correction_name**. Missing value correction if using missing-value PC. Default: 'MV_Crtn_Fisher_Z'
57
+
**correction_name**: Missing value correction if using missing-value PC. Default: 'MV_Crtn_Fisher_Z'
58
+
59
+
**background_knowledge**: class BackgroundKnowledge. Add prior edges according to assigned causal connections. Default: Nnoe.
60
+
For detailed usage, please kindly refer to its `usage example <https://github.com/cmu-phil/causal-learn/blob/main/tests/TestBackgroundKnowledge.py>`_.
61
+
62
+
**verbose**: True iff verbose output should be printed. Default: False.
63
+
64
+
**show_progress**: True iff the algorithm progress should be show in console. Default: True.
55
65
56
66
Returns
57
67
-------------------
58
-
**cg** : a CausalGraph object. Nodes in the graph correspond to the column indices in the data.
68
+
**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.
59
69
60
70
.. [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.
- ":ref:`kci <Kernel-based conditional independence (KCI) test and independence test>`": kernel-based conditional independence test. (As a kernel method, its complexity is cubic in the sample size, so it might be slow if the same size is not small.)
**alpha**: Significance level of individual partial correlation tests. Default: 0.05.
38
+
39
+
**depth**: The depth for the fast adjacency search, or -1 if unlimited. Default: -1.
40
+
41
+
**max_path_length**: the maximum length of any discriminating path, or -1 if unlimited. Default: -1.
37
42
38
-
**background_knowledge**: class BackgroundKnowledge. Add prior edges according to assigned causal connections.
43
+
**verbose**: True is verbose output should be printed or logged. Default: False.
44
+
45
+
**background_knowledge**: class BackgroundKnowledge. Add prior edges according to assigned causal connections. Default: None.
39
46
For detailed usage, please kindly refer to its `usage example <https://github.com/cmu-phil/causal-learn/blob/main/tests/TestBackgroundKnowledge.py>`_.
40
47
48
+
**cache_variables_map**: This variable a map which contains the variables relate with cache. If it is not None, it should contain 'data_hash_key' 、'ci_test_hash_key' and 'cardinalities'. Default: None.
41
49
42
50
43
51
Returns
44
52
-------------------
45
-
**G** : a GeneralGraph object. Nodes in the graph correspond to the column indices in the data. For visualization, please refer to the `running example <https://github.com/cmu-phil/causal-learn/tree/main/tests>`_.
53
+
**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.
54
+
55
+
**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.
56
+
46
57
47
58
.. [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).
- ":ref:`kci <Kernel-based conditional independence (KCI) test and independence test>`": kernel-based conditional independence test. (As a kernel method, its complexity is cubic in the sample size, so it might be slow if the same size is not small.)
**stable**: run stabilized skeleton discovery if True (default = True).
43
+
**stable**: run stabilized skeleton discovery if True. Default: True.
44
44
45
-
**uc_rule**: how unshielded colliders are oriented.
45
+
**uc_rule**: how unshielded colliders are oriented. Default: 0.
46
46
- 0: run uc_sepset.
47
47
- 1: run maxP. Orient an unshielded triple X-Y-Z as a collider with an aditional CI test.
48
48
- 2: run definiteMaxP. Orient only the definite colliders in the skeleton and keep track of all the definite non-colliders as well.
49
49
50
-
**uc_priority**: rule of resolving conflicts between unshielded colliders.
50
+
**uc_priority**: rule of resolving conflicts between unshielded colliders. Default: 2.
51
51
- -1: whatever is default in uc_rule.
52
52
- 0: overwrite.
53
53
- 1: orient bi-directed.
@@ -59,12 +59,17 @@ and n_features is the number of features.
59
59
60
60
**correction_name**. Missing value correction if using missing-value PC. Default: 'MV_Crtn_Fisher_Z'
61
61
62
-
**background_knowledge**: class BackgroundKnowledge. Add prior edges according to assigned causal connections.
62
+
**background_knowledge**: class BackgroundKnowledge. Add prior edges according to assigned causal connections. Default: Nnoe.
63
63
For detailed usage, please kindly refer to its `usage example <https://github.com/cmu-phil/causal-learn/blob/main/tests/TestBackgroundKnowledge.py>`_.
64
64
65
+
**verbose**: True iff verbose output should be printed. Default: False.
66
+
67
+
**show_progress**: True iff the algorithm progress should be show in console. Default: True.
68
+
69
+
65
70
Returns
66
71
-------------------
67
-
**cg** : a CausalGraph object. Nodes in the graph correspond to the column indices in the data.
72
+
**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.
68
73
69
74
.. [1] Spirtes, P., Glymour, C. N., Scheines, R., & Heckerman, D. (2000). Causation, prediction, and search. MIT press.
70
75
.. [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.
- ":ref:`local_score_CV_general <Generalized score with cross validation>`": Generalized score with cross validation for data with single-dimensional variates [2]_.
28
28
- ":ref:`local_score_marginal_general <Generalized score with marginal likelihood>`": Generalized score with marginal likelihood for data with single-dimensional variates [2]_.
29
29
- ":ref:`local_score_CV_multi <Generalized score with cross validation>`": Generalized score with cross validation for data with multi-dimensional variables [2]_.
30
30
- ":ref:`local_score_marginal_multi <Generalized score with marginal likelihood>`": Generalized score with marginal likelihood for data with multi-dimensional variates [2]_.
31
31
32
-
**maxP**: Allowed maximum number of parents when searching the graph.
32
+
**maxP**: Allowed maximum number of parents when searching the graph. Default: None.
33
33
34
-
**parameters**: when using CV likelihood,
34
+
**parameters**: Needed when using CV likelihood. Default: None.
35
35
- parameters['kfold']: k-fold cross validation.
36
36
- parameters['lambda']: regularization parameter.
37
37
- parameters['dlabel']: for variables with multi-dimensions, indicate which dimensions belong to the i-th variable.
@@ -40,7 +40,7 @@ and n_features is the number of features.
40
40
41
41
Returns
42
42
-------------------
43
-
- **Record['G']**: learned causal graph.
43
+
- **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.
44
44
45
45
- **Record['update1']**: each update (Insert operator) in the forward step.
0 commit comments