How DoubleML Scalar Architecture is structured
mainThe DoubleML scalar estimation logic is organized into a hierarchical layer system:
DoubleMLBase(ABC): The foundation layer. It handles data storage and delegates result reporting (likesummary,confint,bootstrap,p_adjust, andsensitivity_analysis) to aDoubleMLFrameworkobject.DoubleMLScalar(ABC): The orchestration layer. It manages the lifecycle of a single-parameter estimation, includingfit(),draw_sample_splitting(),fit_nuisance_models(), and learner management viaset_learners().LinearScoreMixin: A specialized layer for models using linear scores. It implements closed-form parameter estimation ($\hat{\theta} = -E[\psi_b] / E[\psi_a]$) and standard error computation.- Subclasses (e.g.,
PLR,IRM): The implementation layer. These define specific nuisance estimation logic (_nuisance_est()), required learner names (e.g.,ml_l,ml_m), and score element computation (_get_score_elements()).