
Security News
White House Authorizes Private Companies to Conduct Offensive Cyber Operations
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.
causal-tree-decomposition
Advanced tools
Standalone causal tree probability engine. Decompose predictions into weighted causal nodes, compute combined probability, sensitivity analysis, what-if scenarios. Zero dependencies.
Decompose complex predictions into causal trees. Compute combined probability, run sensitivity analysis and what-if scenarios. Zero dependencies.
import { CausalTree, node, or } from 'causal-tree-decomposition'
const tree = new CausalTree('Oil exceeds $100 by Dec 2026')
tree.add(or('Supply disruption', 0.3, [
node('Hormuz closure', 0.15),
node('Russia further cuts', 0.2),
]))
tree.add(node('OPEC cuts production', 0.25))
tree.compute() // 0.52
tree.sensitivity() // [{ label: 'OPEC cuts', impact: 0.12 }, ...]
tree.whatIf('Hormuz closure', 0.95) // { probability: 0.81, delta: +0.29 }
console.log(tree.toString())
npm install causal-tree-decomposition
CausalTree(title, operator?) — create tree (default OR).add(node) — add root node.compute() — combined probability.sensitivity() — which nodes matter most.whatIf(label, newProb) — counterfactual.toJSON() / fromJSON() — serialize.toString() — pretty print.flatten() — all leaf nodesnode(label, prob) — leaf nodeor(label, prob, children?) — OR nodeand(label, prob, children?) — AND nodeMIT — SimpleFunctions
FAQs
Standalone causal tree probability engine. Decompose predictions into weighted causal nodes, compute combined probability, sensitivity analysis, what-if scenarios. Zero dependencies.
The npm package causal-tree-decomposition receives a total of 2 weekly downloads. As such, causal-tree-decomposition popularity was classified as not popular.
We found that causal-tree-decomposition demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.

Research
/Security News
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.