HealthCareAI for Web Semantics
-
(Do not need to run) the dataset is quried from the original knowledge graph (KG) using the jupyter notebook
data/query_data.ipynb
. We remove the orignial dataset:data/1808_original.csv
since we do not have the right to make it publicly avaiable. -
(Run the code) The jupyter notebook
casual/casual_discovery.ipynb
is used to simulate KGs (with different settings of patient number N, which is thesample_size
in the code) and counterfactuals from dataset queried from the the original KG, and learn causal graph from the simulated KGs. The Horn rules are mined usingrule_mining/rule_mining.ipynb
. Rules withPCA confident = 1
are used as a part of the domain knowledge. The LLM prompts are presented incasual/casual_discovery.ipynb
. The final learned causal graphs for each N (sample_size
) are stored incausal/structures_N.pkl
. -
(Run the code) The python file
causal_reasoning.py
is used to esitmate counterfactuals from the simulated KGs. Specify the parametersample_size
for each patient number N.