Fit honest intervention policy tree

Learn an interpretable heterogeneous intervention rule using separate structure, effect-estimation, and untouched policy-evaluation samples.

What it's for

Learns who an intervention actually helps as a rule you can read, using separate samples for structure, effect and evaluation so the rule isn't graded on its own training data.

Extends causal forests and cohort lift into an inspectable rule that says where an intervention works and evaluates that rule out of sample.

What you give it

Inputs split into evidence read from your connected systems, calibration your team owns, and numerical controls that affect precision but never the result's meaning.

Field Type Role Required
bootstrap_draws integer ≥ 100, ≤ 20000 Numerical control Optional
decision_probability number ≥ 0, ≤ 1 Your calibration Optional
estimation_fraction number ≥ 0, ≤ 1 Your calibration Optional
feature_names array of string ≥ 1 item Evidence Yes
max_depth integer ≥ 0, ≤ 5 Your calibration Optional
min_leaf_per_arm integer ≥ 2 Your calibration Optional
minimum_effect number Your calibration Optional
observations array of objects (5 fields) Evidence Yes
propensity_floor number ≥ 0, ≤ 1 Your calibration Optional
seed integer Numerical control Optional
structure_fraction number ≥ 0, ≤ 1 Your calibration Optional

Each observations record

Field Type Required
features object Yes
id string (non-empty) Yes
outcome number Yes
propensity number (≥ 0, ≤ 1) Yes
treated boolean Yes
Example input
{
  "bootstrap_draws": 100,
  "feature_names": [
    "operating_load"
  ],
  "max_depth": 1,
  "min_leaf_per_arm": 4,
  "observations": [
    {
      "features": {
        "operating_load": -1
      },
      "id": "team-week-0",
      "outcome": -1,
      "propensity": 0.5,
      "treated": true
    },
    {
      "features": {
        "operating_load": -1
      },
      "id": "team-week-1",
      "outcome": 0.05,
      "propensity": 0.5,
      "treated": false
    },
    {
      "features": {
        "operating_load": -1
      },
      "id": "team-week-2",
      "outcome": -0.9,
      "propensity": 0.5,
      "treated": true
    },
    {
      "features": {
        "operating_load": -1
      },
      "id": "team-week-3",
      "outcome": 0.15000000000000002,
      "propensity": 0.5,
      "treated": false
    },

Truncated for display — the full payload is 1091 lines.

What you get back

This is the actual output of running the example above — computed by the same function the platform calls, not an illustration.

Example output
{
  "assumptions": [
    "Outcomes are oriented so larger values are better.",
    "Propensities are known or consistently estimated and all confounders are observed.",
    "Units do not interfere with each other and treatment definitions are stable.",
    "Rules apply to teams or cohorts and must not automate individual employment decisions."
  ],
  "feature_importance": [
    {
      "feature": "operating_load",
      "share": 1
    }
  ],
  "leaves": [
    {
      "control_count": 10,
      "effect": -0.95,
      "effect_interval_90": {
        "high": -0.8917,
        "low": -1.0002
      },
      "leaf_id": "leaf-0",
      "probability_effect_exceeds_minimum": 0,
      "recommend_treatment": false,
      "status": "estimated",
      "treated_count": 6
    },
    {
      "control_count": 8,
      "effect": 2.0208,
      "effect_interval_90": {
        "high": 2.0627,
        "low": 1.9706
      },
      "leaf_id": "leaf-1",
      "probability_effect_exceeds_minimum": 1,
      "recommend_treatment": true,
      "status": "estimated",
      "treated_count": 12
    }
  ],
  "method": "three_way_honest_ipw_intervention_policy_tree_v1",
  "out_of_sample_policy_evaluation": {
    "effective_sample_size": 15,

Truncated for display — the full payload is 67 lines.

How it works

Constrained optimization — Pick the best feasible option under real limits — budget, headcount, dependencies, capacity — rather than ranking a list and hoping it fits.

  1. 1 Learn an interpretable heterogeneous intervention rule using separate structure, effect-estimation, and untouched policy-evaluation samples.
  2. 2 Evaluate the method-specific diagnostics and gates returned by the function, then abstain unless the declared decision clears them under locally governed thresholds.

Before you trust it

Every tool in the catalog ships with the conditions under which its answer is meaningful — and the conditions under which it should abstain instead of guessing.

Assumptions & guardrails

  • Objectives use commensurable locally governed value units, constraints reflect real feasibility, and uncertainty covers plausible adverse inputs.
  • The recommendation is optimal only for its stated objective, feasible set, evidence, and solver guarantee; it is not a universal management optimum.

Minimum evidence

  • observations: required and organization-defined
  • feature_names: at least 1 rows/items

How to validate it

Backtest the chosen action against simple feasible baselines on held-out scenarios, sweep costs/constraints/risk tolerance, and require constraint feasibility under adverse inputs.

Calibrating it to your org

Same for everyone

The mathematical kernel, validation rules, method version, and JSON output semantics are organization-independent; no tenant-trained coefficients or company benchmark is embedded in the function.

Specific to you

  • metric/outcome definitions, entity grain, observation window, costs, thresholds, priors, and constraints represented by the function inputs

Calibration workflow

  1. 1 Define the management decision, target outcome, aggregate unit, privacy boundary, cadence, and prediction/intervention horizon for this organization.
  2. 2 Build a tenant-scoped historical cohort using only information available before each prediction or decision; preserve zero periods, censoring, assignment probabilities, and unresolved outcomes when the method requires them.
  3. 3 Estimate statistical parameters on training history, but obtain costs, utilities, risk tolerance, practical-effect thresholds, capacity, and policy constraints from accountable decision owners.
  4. 4 Validate on later time windows or held-out aggregate units at the deployment grain, against a simple baseline and the function-specific validation strategy.
  5. 5 Deploy only if the returned decision clears evidence, overlap, calibration, robustness, and guardrail checks; warning, unsupported, schema-gap, and fallback decisions are abstentions.
  6. 6 Monitor realized outcomes, data drift, coverage, and decision regret; recalibrate at a governed cadence or after a detected regime/definition change, never merely because a stakeholder dislikes the result.

Call it from your AI

You don't wire up 388 tools in your MCP client. The GitRevio MCP server exposes 18 tools, three of which let an agent search the catalog, read a tool's schema, and run it — so the assistant finds this one on its own.

gitrevio_capabilities_search
  { "q": "learn an interpretable heterogeneous intervention rule" }
  → finds "fit_honest_intervention_policy_tree"

gitrevio_capability_describe
  { "capability_id": "fit_honest_intervention_policy_tree" }
  → returns the input schema and agent guidance shown on this page

gitrevio_capability_run
  { "capability_id": "fit_honest_intervention_policy_tree", "arguments": { ... } }
  → returns the result shown above

Works in Claude Desktop, Claude Code, Cursor, Cline, Continue.dev, Goose and Aider. See the MCP server.

Related tools

Monitor sequential intervention experiment

Monitor cumulative binary intervention outcomes with beta-binomial posteriors, Bayes factors, expected regret, and preregistered success, harm, or futility stopping.

Sequential Bayesian & bandits

Optimize team topology

Partition the collaboration graph into bounded teams while balancing preserved working relationships, skill coverage, membership stability, and fixed assignments.

Network & dependency analysis

Audit causal claim negative controls

Gate a causal effect claim using prespecified negative outcome/exposure controls, Benjamini-Hochberg multiplicity control, and an omnibus chi-square falsification test.

Causal inference & experiment design

Audit cluster randomization integrity

Audit cluster-randomized experiments for practical baseline imbalance and differential outcome observation, with cluster-size-weighted standardized differences and assignment permutation diagnostics.

Causal inference & experiment design

Audit growth incrementality experiment integrity

Audit aggregate randomized growth experiments before anyone trusts channel incrementality: enforce unique experimental units, nondegenerate logged propensities, both arms, control-spend discipline, baseline balance, spillover and evidence gates; then estimate propensity-weighted baseline-adjusted contribution, cluster-unit bootstrap uncertainty and incremental return on spend.

Causal inference & experiment design

Audit joint outcome network integrity

Audit whether a company-specific Bayesian joint-outcome network is fit for reliance by validating point-in-time lineage, DAG and CPT completeness, effective support, protected-attribute exclusions, and strictly out-of-time outcome calibration against a baseline.

Sequential Bayesian & bandits

See every tool in Causal evidence & experiments →

Ready to See Your Engineering work clearly?

Request a free demo