Skip to content

Commit bc5dfcb

Browse files
v2.11.0 (#138)
* Adding bips_tpc: This version introduces the bips_tpc module, based on the temporal PC (tPC) and the micd package. It enables causal discovery through the PC algorithm allowing for Edge constraints, mixed data, and missing data handling. * Updating basic conf example. Updating example for MVPC.
1 parent 1c11ba4 commit bc5dfcb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1308
-132
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.10.0
1+
2.11.0

config/config.json

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"benchmark_setup": [
33
{
4+
"title": "example_config",
45
"data": [
56
{
67
"graph_id": "avneigs4_p20",
@@ -31,17 +32,24 @@
3132
"graph_true_plots": true,
3233
"graph_true_stats": true,
3334
"ggally_ggpairs": true,
34-
"graph_plots": [
35-
"fges-sem-bic",
36-
"tabu-bge",
37-
"itsearch-bge",
38-
"pc-gaussCItest"
39-
],
35+
"graph_estimation": {
36+
"ids": [
37+
"fges-sem-bic",
38+
"tabu-bge",
39+
"itsearch-bge",
40+
"pc-gaussCItest"
41+
],
42+
"convert_to": [],
43+
"graphs": true,
44+
"adjmats": true,
45+
"diffplots": true,
46+
"csvs": true,
47+
"graphvizcompare": true
48+
},
4049
"mcmc_traj_plots": [],
4150
"mcmc_heatmaps": [],
4251
"mcmc_autocorr_plots": []
43-
},
44-
"title": "config"
52+
}
4553
}
4654
],
4755
"resources": {

config/paper_er_bin.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
"path": true,
2727
"text": false,
2828
"ids": [
29-
"gobnilp-bde",
3029
"grasp-bdeu",
3130
"boss-bdeu",
3231
"asobs-bdeu",

config/paper_er_sem.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
"path": true,
2727
"text": false,
2828
"ids": [
29-
"gobnilp-bge",
3029
"boss-sem-bic",
3130
"grasp-sem-bic",
3231
"notears-l2",

config/paper_er_sem_small.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
"path": true,
2727
"text": false,
2828
"ids": [
29-
"gobnilp-bge",
3029
"boss-sem-bic",
3130
"grasp-sem-bic",
3231
"notears-l2",

config/paper_hepar2_bin.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
"path": true,
2727
"text": false,
2828
"ids": [
29-
"gobnilp-bde",
3029
"grasp-bdeu",
3130
"boss-bdeu",
3231
"asobs-bdeu",

config/paper_hepar2_sem.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
"path": true,
2727
"text": false,
2828
"ids": [
29-
"gobnilp-bge",
3029
"boss-sem-bic",
3130
"grasp-sem-bic",
3231
"notears-l2",

config/paper_sachs.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
"path": true,
2020
"text": false,
2121
"ids": [
22-
"gobnilp-bge",
2322
"boss-sem-bic",
2423
"grasp-sem-bic",
2524
"notears-l2",

docs/source/available_background_knowledge.rst

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,47 +8,54 @@ Edge constraints
88
---------------------------------------
99

1010
Benchpress allows users to incorporate edge constraints to guide structure learning algorithms in several packages:
11-
**pcalg**, **mvpc**, **bnlearn**, **tetrad**, **gobnilp**, and **bidag**. These constraints enable the inclusion of prior knowledge to refine
11+
**pcalg**, **bips_tpc**, **mvpc**, **bnlearn**, **tetrad**, **gobnilp**, and **bidag**. These constraints enable the inclusion of prior knowledge to refine
1212
the search space of causal graphs, improving the reliability of the inferred relationships. Users can specify **forbidden or
1313
required edges**, **tiers for temporal ordering**, and **group-based constraints**.
1414

1515
The edge constraints should be defined in a JSON file located within the ``resources/constraints`` folder.
1616

1717
.. rubric:: Supported Constraints
1818

19-
+-------------+---------------------+--------------------+-----------+----------------------+---------------------+
20-
| **Package** | **forbidden_edges** | **required_edges** | **tiers** | **forbidden_groups** | **required_groups** |
21-
+=============+=====================+====================+===========+======================+=====================+
22-
| mvpc | X | X | N/A | N/A | N/A |
23-
+-------------+---------------------+--------------------+-----------+----------------------+---------------------+
24-
| pcalg | X | X | N/A | N/A | N/A |
25-
+-------------+---------------------+--------------------+-----------+----------------------+---------------------+
26-
| bnlearn | X | X | X | X | X |
27-
+-------------+---------------------+--------------------+-----------+----------------------+---------------------+
28-
| tetrad | X | X | X | X | X |
29-
+-------------+---------------------+--------------------+-----------+----------------------+---------------------+
30-
| gobnilp | X | X | X | X | X |
31-
+-------------+---------------------+--------------------+-----------+----------------------+---------------------+
32-
| bidag | X | N/A | N/A | X | N/A |
33-
+-------------+---------------------+--------------------+-----------+----------------------+---------------------+
19+
+-------------+---------------------+--------------------+-----------+----------------------+---------------------+-----------------+------------------+------------------+
20+
| **Package** | **forbidden_edges** | **required_edges** | **tiers** | **forbidden_groups** | **required_groups** | **context_all** | **context_tier** | **source_nodes** |
21+
+=============+=====================+====================+===========+======================+=====================+=================+==================+==================+
22+
| bips_tpc | X | N/A | X | X | N/A | X | X | X |
23+
+-------------+---------------------+--------------------+-----------+----------------------+---------------------+-----------------+------------------+------------------+
24+
| mvpc | X | X | N/A | N/A | N/A | N/A | N/A | N/A |
25+
+-------------+---------------------+--------------------+-----------+----------------------+---------------------+-----------------+------------------+------------------+
26+
| pcalg | X | X | N/A | N/A | N/A | N/A | N/A | N/A |
27+
+-------------+---------------------+--------------------+-----------+----------------------+---------------------+-----------------+------------------+------------------+
28+
| bnlearn | X | X | X | X | X | N/A | N/A | N/A |
29+
+-------------+---------------------+--------------------+-----------+----------------------+---------------------+-----------------+------------------+------------------+
30+
| tetrad | X | X | X | X | X | N/A | N/A | N/A |
31+
+-------------+---------------------+--------------------+-----------+----------------------+---------------------+-----------------+------------------+------------------+
32+
| gobnilp | X | X | X | X | X | N/A | N/A | N/A |
33+
+-------------+---------------------+--------------------+-----------+----------------------+---------------------+-----------------+------------------+------------------+
34+
| bidag | X | N/A | N/A | X | N/A | N/A | N/A | N/A |
35+
+-------------+---------------------+--------------------+-----------+----------------------+---------------------+-----------------+------------------+------------------+
36+
3437

3538
.. rubric:: Description
3639

3740
- ``forbidden_edges``: A list of directed edges that are explicitly prohibited from existing between specific nodes. Each edge is defined as a pair of nodes, where the first node cannot directly cause the second node.
3841
- ``required_edges``: A list of directed edges that are enforced between specific nodes. Each edge is defined as a pair of nodes, where the first node must directly cause the second node.
39-
40-
- *Note: For algorithms in the* **pcalg** and **mvpc** *package, the above attributes only specify the presence or absence of edges and do not control their directionality.*
4142
- ``tiers``: Defines a temporal ordering of nodes across multiple levels (or) tiers. Nodes in one tier are constrained from causing nodes in any of the preceding tiers.
4243
- ``tier_settings``:
4344

4445
- ``forbidden_within_tiers``: If set to `true`, prevents edges between nodes that reside within the same tier.
4546
- ``can_only_cause_next_tier``: If set to `true`, restricts nodes in one tier to only influence or cause nodes in the immediate next tier.
4647

47-
- ``Groups``: Defines relationships between sets of nodes, grouping them for the purpose of controlling edge behavior across multiple nodes at once. Each group is defined by a collection of "cause" nodes and "effect" nodes.
48+
- *Groups*: Defines relationships between sets of nodes, grouping them for the purpose of controlling edge behavior across multiple nodes at once. Each group is defined by a collection of "cause" nodes and "effect" nodes.
4849

4950
- ``forbidden_groups``: A set of constraints that prohibits directed edges between specified groups of nodes.
5051
- ``required_groups``: A set of requirements that enforces directed edges between specified groups of nodes.
52+
- ``context_all``: If set to `true`, edges added from this node to all other nodes.
53+
- ``context_tier``: If set to `true`, edges added from this node to all nodes within the same tier.
54+
- ``source_nodes``: A list of nodes that are restricted to have no parents.
5155

56+
.. note::
57+
58+
For algorithms in the **pcalg** and **mvpc** *package, the above attributes only specify the presence or absence of edges and do not control their directionality.*
5259

5360
.. rubric:: Example JSON
5461

@@ -89,7 +96,10 @@ The edge constraints should be defined in a JSON file located within the ``resou
8996
"cause": ["22"],
9097
"effect": ["23"]
9198
}
92-
]
99+
],
100+
"context_all": ["1"],
101+
"context_tier": ["3"],
102+
"source_nodes": ["11"]
93103
}
94104
95105

docs/source/available_structure_learning_algorithms.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Algorithms
1515
structure_learning_algorithms/bidag_itsearch
1616
structure_learning_algorithms/bidag_order_mcmc
1717
structure_learning_algorithms/bidag_partition_mcmc
18+
structure_learning_algorithms/bips_tpc
1819
structure_learning_algorithms/bnlearn_fastiamb
1920
structure_learning_algorithms/bnlearn_gs
2021
structure_learning_algorithms/bnlearn_h2pc
@@ -30,7 +31,6 @@ Algorithms
3031
structure_learning_algorithms/bnlearn_sihitonpc
3132
structure_learning_algorithms/bnlearn_tabu
3233
structure_learning_algorithms/causaldag_gsp
33-
structure_learning_algorithms/causallearn_ges
3434
structure_learning_algorithms/causallearn_grasp
3535
structure_learning_algorithms/corr_thresh
3636
structure_learning_algorithms/dualpc
@@ -112,6 +112,10 @@ To add new modules, see :ref:`new_modules`.
112112
- `DAG <https://en.wikipedia.org/wiki/Directed_acyclic_graph>`__, `CPDAG <https://search.r-project.org/CRAN/refmans/pcalg/html/dag2cpdag.html>`__
113113
- `BiDAG <https://cran.r-project.org/web/packages/BiDAG/index.html>`__
114114
- :ref:`bidag_partition_mcmc`
115+
* - tPC
116+
- `CPDAG <https://search.r-project.org/CRAN/refmans/pcalg/html/dag2cpdag.html>`__
117+
- `tpc <https://github.com/bips-hb/tpc>`__
118+
- :ref:`bips_tpc`
115119
* - Fast IAMB
116120
- `DAG <https://en.wikipedia.org/wiki/Directed_acyclic_graph>`__
117121
- `bnlearn <https://www.bnlearn.com/>`__
@@ -248,7 +252,7 @@ To add new modules, see :ref:`new_modules`.
248252
- `UDG <https://arxiv.org/pdf/2210.00822.pdf#subsection.2.2>`__
249253
- `gues <https://pypi.org/project/gues/>`__
250254
- :ref:`grues`
251-
* - Graphical lasso
255+
* - GLasso
252256
- `UG <https://en.wikipedia.org/wiki/Graph_(discrete_mathematics)#Graph>`__
253257
- `huge <https://cran.r-project.org/web/packages/huge/index.html>`__
254258
- :ref:`huge_glasso`

0 commit comments

Comments
 (0)