AIToday
AI in HealthcareQiita 機械学習Published: Nov 27, 2026, 22:01 JST

From-scratch DML test: LightGBM hits 91% coverage, deep forest 25–44%

Send on LINE
From-scratch DML test: LightGBM hits 91% coverage, deep forest 25–44%

3 Key Points

  1. What happened

    Using numpy, LightGBM and scikit-learn with no dedicated package, the author ran 100 simulations with a true effect of 0.5; linear regression landed at +0.5068, LightGBM achieved 91% coverage without cross-fitting and 88% with it, while the deep random forest reached only 44% and 25%.

  2. Why it matters

    The gap suggests that when a flexible model fails to capture curved confounding, the resulting bias can dominate the interval, since the correct standard error average (0.034) and actual spread (0.041) were close yet coverage collapsed.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, every morning.

Context & Analysis

The author's goal was to test, without a dedicated causal-inference package, how much orthogonalization and cross-fitting each contribute to Double/Debiased Machine Learning. The simulation deliberately included a curved confounder built from sine, squared and multiplied terms, so a linear adjustment could not remove it. That design is why ordinary least squares failed so starkly, while the two LightGBM setups kept the average estimate close to the true 0.5 and delivered near-nominal interval coverage.

The deep random forest tells a different story. Its average standard error (0.034) was close to the actual spread of its estimates (0.041), so the width of the interval was not the problem. Instead, the estimates were far enough from 0.5 that the interval simply missed, and coverage fell to 44% without cross-fitting and 25% with it. In that specific setup, cross-fitting made the bias larger rather than smaller, which the author attributes cautiously to each model learning on only four-fifths of the data and leaving more of the curvature unaccounted for.

The write-up also flags its own scope limits: one sample size, one number of columns, one curvature shape, and roughly ±5 percentage points of noise in the coverage rates over 100 runs, with the author speculating that more rows would shrink the forest's bias.

FAQ
What does the true effect of 0.5 mean in this simulation?
The author generated a partially linear model where the true treatment effect was known to be 0.5, so every estimate could be compared against that fixed value.
Which learner performed best on interval coverage?
LightGBM with no cross-fitting reached 91% coverage, narrowly ahead of the 5-fold version at 88%, while linear regression covered 0%.
How long does the simulation take?
Fitting 24 models per run over 100 runs took about 15 minutes on 2 cores.
Qiita 機械学習Read Original Article
Send on LINE

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articlelocalcut keeps 360MB of travel video local, sends 3.6KB to Claude