We implement Ananke: an object-oriented Python package for causal inference with graphical models. At the top of our inheritance structure is an easily extensible Graph class that provides an interface to several broadly useful graph-based algorithms and methods for visualization. We use best practices of object-oriented programming to implement subclasses of the Graph superclass that correspond to types of causal graphs that are popular in the current literature. This includes directed acyclic graphs for modeling causally sufficient systems, acyclic directed mixed graphs for modeling unmeasured confounding, and chain graphs for modeling data dependence and interference. Within these subclasses, we implement specialized algorithms for common statistical and causal modeling tasks, such as separation criteria for reading conditional independence, nonparametric identification, and parametric and semiparametric estimation of model parameters. Here, we present a broad overview of the package and example usage for a problem with unmeasured confounding. Up to date documentation is available at \url{https://ananke.readthedocs.io/en/latest/}.
翻译:我们实现了Ananke:一个面向对象的Python包,用于基于图模型的因果推断。在我们的继承结构顶层,是一个易于扩展的Graph类,它为多个广泛有用的基于图的算法和可视化方法提供了接口。我们采用面向对象编程的最佳实践,实现了Graph超类的子类,这些子类对应于当前文献中流行的因果图类型。这包括用于建模因果充分系统的有向无环图、用于建模未测量混杂的环状有向混合图,以及用于建模数据依赖和干扰的链图。在这些子类中,我们实现了常见统计和因果建模任务的专门算法,例如读取条件独立性的分离准则、非参数识别,以及模型参数的参数和半参数估计。在此,我们对该包进行了总体概述,并针对一个存在未测量混杂的问题给出了使用示例。最新文档可在\url{https://ananke.readthedocs.io/en/latest/}获取。