Changelog

0.1.0 (2026-11-29)

The first release.

Estimators

  • causal_forest: an honest causal forest from a formula ("y ~ w | x1 + x2 | fe"), with out-of-bag effects and their variances, the doubly robust average effect with its standard error (clustered when the forest is), best_linear_projection and calibration_test (robust or clustered standard errors, in two streaming passes), variable_importance and predict. The outcome and treatment are centered with out-of-bag regression forests (nuisance="forest") or a linear fit (nuisance="linear", faster).

  • instrumental_forest: honest forests for the local effects of a treatment that an instrument moves (instrument=), with out-of-bag estimates and their variances, the average of the local effects with its standard error, the best linear projection and predict. The centering, clustering and weights are the causal forest’s; calibration_test is not available. The average effect keeps the correction’s denominator (the covariance of the treatment and the instrument given the features) at no less than a tenth of its average, so that a few rows where the instrument is weak cannot carry the average, and warns when that applies to one percent of the rows or more.

  • quantile_forest: honest quantile forests, whose trees keep the outcomes of their estimation rows so that any conditional quantile can be predicted; trees are grown to separate the distribution at chosen quantiles. Out-of-bag quantiles, oob_score (pinball loss and coverage), predict for new rows in batches, and variable importance. Fixed effects, variances and profile=True are not available for it yet.

  • regression_forest: honest regression forests with out-of-bag predictions, variances and variable importance.

  • random_forest for numeric outcomes and class labels (probabilities and oob_score), with Gini or entropy splits, sampling with replacement (a Poisson bootstrap) or without, and optional honesty. decision_tree, grown level by level from histograms in one pass per level, with tree() listing the nodes.

  • Forests predict without variances unless variance_group_size is above 1. node_size_rule for random_forest and decision_tree is "split" (grf, ranger and randomForest’s rule: a node of at most min_node_size rows is not split) or "leaf" (scikit-learn’s and rpart’s: every leaf has at least that many rows); regression_forest follows grf’s rule. Leaves that no estimation-half row reached are pruned, as in grf’s honest trees.

Fixed effects, weights and inference

  • Fixed effects in regression_forest, causal_forest and instrumental_forest (fixed_effects=): "backfit" (default) alternates a forest and the group effects until they change by less than backfit_tolerance times their standard error (or max_iterations rounds, with a warning), re-estimating the leaf values of the first round’s trees in later rounds (backfit_warm_start=True); "outcome_within" subtracts the groups’ outcome means once, with a between-group diagnostic; "group_means" adds the groups’ feature means as features (regression forests). fixef_rm sets whether rows alone in a group take part in the group-effect estimates.

  • weights= in every estimator: sample weights in the splits, the leaves, the effects, the projection and the tests, the nuisance forests, and every regression on the fixed effects.

  • vcov= of best_linear_projection and calibration_test takes hdfe-stream’s spellings ("HC0" to "HC3", "hetero", {"CRV1": column}); results record hdfe-stream’s vcov_type keys.

Data, memory and prediction

  • The data are a Parquet path, a glob or a Polars frame. The features are binned (at most 256 bins each) into a file on disk, and trees are grown in batches from passes over it. max_memory_gb and memory_reserve size the batches from the memory left; a fit grows at most eight trees per thread at a time; profile=True returns the expected memory and disk of a fit, and a fit warns when the budget leaves room for fewer trees per batch than threads, or for no whole group of trees.

  • predict reads and predicts in batches, with output= to write a Parquet file, keep= to carry columns through and batch_rows=; include_fixed_effects=True adds each row’s group effects back (with new_groups=), and group_effects() returns them.

  • plot() for every result: effects, heterogeneity, projection, calibration, importance, and the tree.

Tests and benchmarks

  • Reference tests against rpart, sandwich, grf and ranger (tests/test_references.py, with the R script benchmarks/external/forest_references.R), and a Monte Carlo comparison with grf and EconML (benchmarks/validation/compare.py).

  • Time, memory and accuracy against grf, ranger, EconML, scikit-learn and quantile-forest from 10,000 to 10 million rows, and the speed-up with threads (benchmarks/; results in the documentation).