Efficient estimation of causal and structural parameters can be automated using the Riesz representation theorem and debiased machine learning (DML). We present genriesz, an open-source Python package that implements automatic DML and generalized Riesz regression, a unified framework for estimating Riesz representers by minimizing empirical Bregman divergences. This framework includes covariate balancing, nearest-neighbor matching, calibrated estimation, and density ratio estimation as special cases. A key design principle of the package is automatic regressor balancing (ARB): given a Bregman generator $g$ and a representer model class, genriesz} automatically constructs a compatible link function so that the generalized Riesz regression estimator satisfies balancing (moment-matching) optimality conditions in a user-chosen basis. The package provides a modulr interface for specifying (i) the target linear functional via a black-box evaluation oracle, (ii) the representer model via basis functions (polynomial, RKHS approximations, random forest leaf encodings, neural embeddings, and a nearest-neighbor catchment basis), and (iii) the Bregman generator, with optional user-supplied derivatives. It returns regression adjustment (RA), Riesz weighting (RW), augmented Riesz weighting (ARW), and TMLE-style estimators with cross-fitting, confidence intervals, and $p$-values. We highlight representative workflows for estimation problems such as the average treatment effect (ATE), ATE on treated (ATT), and average marginal effect estimation. The Python package is available at https://github.com/MasaKat0/genriesz and on PyPI.


翻译:基于Riesz表示定理和去偏机器学习(DML)可实现因果与结构参数的高效自动化估计。本文介绍genriesz,一个实现自动DML与广义Riesz回归的开源Python包。该框架通过最小化经验Bregman散度来估计Riesz表示子,其特例涵盖协变量平衡、最近邻匹配、校准估计及密度比估计。该包的核心设计原则是自动回归器平衡(ARB):给定Bregman生成函数$g$与表示子模型类,genriesz自动构建兼容的连接函数,使广义Riesz回归估计量在用户选择的基函数下满足平衡(矩匹配)最优性条件。本包提供模块化接口用于指定:(i)通过黑箱评估预言机定义目标线性泛函;(ii)通过基函数(多项式、RKHS近似、随机森林叶节点编码、神经嵌入及最近邻捕获基)定义表示子模型;(iii)Bregman生成函数(支持用户自定义导数选项)。该包可输出经过交叉拟合的回归调整(RA)、Riesz加权(RW)、增强Riesz加权(ARW)及TMLE型估计量,并提供置信区间与$p$值。我们重点展示了针对平均处理效应(ATE)、处理组平均处理效应(ATT)及平均边际效应等典型估计问题的代表性工作流程。该Python包可通过https://github.com/MasaKat0/genriesz获取,并已发布于PyPI。

0
下载
关闭预览

相关内容

【干货书】Python机器学习,361页pdf
专知会员服务
271+阅读 · 2021年2月25日
【干货书】用于概率、统计和机器学习的Python,288页pdf
专知会员服务
291+阅读 · 2020年6月3日
Python地理数据处理,362页pdf,Geoprocessing with Python
专知会员服务
116+阅读 · 2020年5月24日
经典教材《统计学习导论》Python版
专知
28+阅读 · 2020年10月19日
Github项目推荐 | gensim - Python中的主题建模
AI研习社
15+阅读 · 2019年3月16日
国家自然科学基金
6+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
6+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员