How h-n-chavda/root-cause-detection works
This repository implements causal-graph recovery with the PC algorithm: process data becomes a graph, which can be compared with a reference graph. The documented method separates skeleton discovery from edge orientation, and the documented datasets include two ultra-processed-food cases and Tennessee Eastman. The sampled runner shows loading, graph summarization and optional evaluation; the sampled algorithm excerpt shows skeleton discovery and collider orientation. Meek-rule propagation and the README’s broader run behavior are documented but not visible in the excerpts.
Main entry points: main.py PC runner · utils.py PC algorithm · DatasetUF.csv Process datasets · datasetTE.csv Tennessee data
Components 15
Inputs
- Process datasets
PC_Algorithm/DatasetUF.csv - Tennessee data
PC_Algorithm/datasetTE.csv - Reference graphs
PC_Algorithm/UFGroundTruth.txt
Graph Recovery
- PC runner
PC_Algorithm/main.py - Dataset loader
PC_Algorithm/utils.py - PC algorithm
PC_Algorithm/utils.py - Skeleton discovery
PC_Algorithm/utils.py - Independence tests
PC_Algorithm/utils.py - Edge orientation
PC_Algorithm/utils.py - Graph summary
PC_Algorithm/utils.py
Evaluation
- Reference loader
PC_Algorithm/utils.py - Graph metrics
PC_Algorithm/utils.py - Metric formatter
PC_Algorithm/utils.py - Printed report
Other components
- Researcher
Connections 17
- Researcher → PC runner: runs
- Process datasets → Dataset loader: loads
- Tennessee data → Dataset loader: loads
- PC runner → Dataset loader: calls
- Dataset loader → PC algorithm: returns data
- PC runner → PC algorithm: calls
- PC runner → Graph summary: calls
- PC runner → Reference loader: calls
- Reference graphs → Reference loader: loads
- PC runner → Graph metrics: calls
- PC runner → Metric formatter: calls
- PC algorithm → Skeleton discovery: discovers
- Skeleton discovery → Independence tests: tests
- PC algorithm → Edge orientation: orients
- PC runner → Printed report: prints
- Graph summary → Printed report: reports graph
- Metric formatter → Printed report: reports metrics