We give novel Python and R interfaces for the (Java) Tetrad project for causal modeling, search, and estimation. The Tetrad project is a mainstay in the literature, having been under consistent development for over 30 years. Some of its algorithms are now classics, like PC and FCI; others are recent developments. It is increasingly the case, however, that researchers need to access the underlying Java code from Python or R. Existing methods for doing this are inadequate. We provide new, up-to-date methods using the JPype Python-Java interface and the Reticulate Python-R interface, directly solving these issues. With the addition of some simple tools and the provision of working examples for both Python and R, using JPype and Reticulate to interface Python and R with Tetrad is straightforward and intuitive.
翻译:我们为(Java)Tetrad项目提供了新颖的Python与R语言接口,用于因果建模、搜索与估计。Tetrad项目作为文献中的核心工具,已持续开发超过30年。其部分算法(如PC和FCI)已成为经典,另一些则是近年成果。然而,研究者日益需要从Python或R中调用底层Java代码,而现有方法存在不足。我们通过JPype(Python-Java接口)与Reticulate(Python-R接口)提供了全新的现代化解决方案,直接攻克了这些难题。通过添加简易工具并给出Python与R两种语言的可运行示例,利用JPype与Reticulate实现Tetrad与Python/R的交互将变得直观且便捷。