dml-core
Double / debiased machine learning (Chernozhukov et al., 2018) for causal inference in Rust, modelled on and numerically validated against the DoubleML package.
- Models: partially linear regression (
Plr, partialling-out and IV-type scores), interactive regression model (Irm, ATE / ATTE), partially linear IV (Pliv), interactive IV model (Iivm, LATE), difference-in-differences for panels (Did) and repeated cross-sections (DidCs) - Inference: DML2 estimation, standard errors, confidence intervals, multiple treatments, repeated sample splitting, multiplier bootstrap, joint intervals, Romano–Wolf / Holm / Bonferroni
- Heterogeneous effects: S-, T-, X-, R- and DR-learners; best linear predictor of the CATE and group average treatment effects with robust inference
- Learners:
RandomForestRegressor/RandomForestClassifier,Ols(ridge),Lasso,LogisticRegression, or your own via theRegressor/Classifiertraits - Fast: pure Rust, no BLAS; folds fitted in parallel with rayon (
parallelfeature, default)
use ;
let data = new?;
let fit = new // learners for E[Y|X] and E[D|X]
.n_folds
.n_rep
.seed
.fit?;
println!;
Every model is tested for parity with Python DoubleML on identical data and sample splits (agreement to 1e-9). Python bindings, benchmarks and the full documentation live in the repository.
License
Licensed under either of Apache License 2.0 or MIT license, at your option.