You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BUG: DecisionTreeRegressor: invalid impurity for criterion="poisson" with missing values #32870
When missing values are present in X, DecisionTreeRegressor(criterion="poisson", ...) sometimes computes invalid impurities.
Impurity should match with half-poisson deviance according to the documentation. And it is indeed the case when they are no missing values. But when missing values are present, something goes wrong, and you can even get negative impurities.
I found this bug thanks to my big test from this draft PR #32193. This same test shows that impurity does match sklearn.metrics.mean_poisson_deviance(...) / 2 when no missing values are present.
Activity
cakedev0 commentedon Dec 9, 2025
Note: This issue will be fixed by PR #32119, no additional PR is needed.
cakedev0 commentedon Jan 15, 2026
The bug happens for
ExtraTreeRegressortoo: