Skip to content

API Reference

Welcome to the DoubleML PySpark API documentation. This section provides comprehensive reference material for all classes and methods available in the DoubleML PySpark library.

Overview

DoubleML PySpark is designed around a modular architecture that enables scalable causal inference using Double Machine Learning techniques. The API follows a consistent design pattern across all estimators, making it easy to switch between different causal models.

Architecture

The library is built on a hierarchical class structure:

DoubleMLBase (Abstract Base Class)
└──  DoubleMLScalar (Single Parameter estimation)
    ├── DoubleMLPLR (Partially Linear Regression)
    └── DoubleMLIRM (Interactive Regression Model)

Core Classes

Base Infrastructure

Class Purpose Documentation
DoubleMLBase Abstract base class providing core functionality for all DoubleML estimators Core methods, cross-fitting, inference
DoubleMLScalar Single parameter estimation Simplified estimation workflow

Causal Models

Class Purpose Documentation
DoubleMLPLR Partially Linear Regression model Estimates treatment effects in partially linear models
DoubleMLIRM Interactive Regression Model Estimates average treatment effects with binary treatment

Effect Heterogeneity Tools

Class Purpose Documentation
DoubleMLBLP Best Linear Predictor Projects CATEs and GATEs onto linear combinations of covariates

Tuning

Hyperparameter Tuning API: Optuna-based hyperparameter optimization for nuisance models

Component Type Description
DMLOptunaResult dataclass Container for tuning results: best estimator, parameters, score, and Optuna study history
_dml_tune_optuna function Performs Optuna hyperparameter tuning for a given estimator using PySpark DataFrames