| title | CausalFlow - Visual Bayesian Network Workbench |
|---|---|
| emoji | 🔮 |
| colorFrom | blue |
| colorTo | purple |
| sdk | docker |
| app_port | 7860 |
The open-source, visual-first Bayesian Network workbench.
Build · Infer · Understand causality — in your browser.
CausalFlow is an interactive workbench for building and analyzing Bayesian Networks. Drop a CSV or define nodes from scratch, draw causal relationships, and run exact inference — all through a drag-and-drop interface. No code, no installs, no MATLAB license.
Perfect for:
- 📚 Students learning probabilistic graphical models
- 🔬 Researchers prototyping causal models
- 📊 Data Scientists exploring Bayesian inference
- 🖱️ Visual DAG Editor — Drag-and-drop nodes & edges on an infinite canvas
- 📊 Three Workflows — Data-driven (CSV → structure learning), expert knowledge, or hybrid
- ⚡ Real-Time Inference — Set evidence, watch posteriors update via Variable Elimination
- 🔀 Auto Layout — Dagre-powered hierarchical layout
- 🧠 Smart CSV Ingestion — Auto-detect discrete variables and state spaces
- 🎯 CPT Editor — Define conditional probability tables by hand
- 🏗️ Structure Learning — Hill-Climbing algorithm discovers causal structure
- 🌐 Zero Install — Runs entirely in the browser
- Upload a CSV → Click "Upload CSV" in the sidebar
- Learn Structure → Auto-discover causal relationships
- Set Evidence → Click on a node, select a state
- Run Inference → Watch probabilities propagate in real-time
Frontend: React 19 · React Flow · Zustand · Tailwind CSS · Recharts
Backend: FastAPI · pgmpy · NetworkX · PyTorch (CPU)
Algorithms: Variable Elimination · Hill-Climbing Structure Learning
- Upload the Titanic dataset (built-in example)
- The system auto-detects variables:
Survived,Pclass,Sex,Age - Learn structure or manually draw edges
- Set evidence:
Sex=female,Pclass=1st - Query:
P(Survived=Yes | Sex=female, Pclass=1st)≈ 0.97
- Create nodes:
Symptom,Disease,Test Result - Define CPTs manually (if no data)
- Set evidence:
Symptom=fever,Test=positive - Infer:
P(Disease | evidence)
- GitHub Repository: shuqiwhat/causal-flow
- Documentation: Project Blog
- Production Demo: Vercel Deployment
PRs are welcome! See CONTRIBUTING.md.
MIT © shuqiwhat
Built with ❤️ by @shuqiwhat
If you find this helpful, give it a ⭐ on GitHub!