quantile_forest/oob-without-bootstrap
| Pack | Severity | Fix | Versions |
|---|---|---|---|
| Quantile Forest | error | none, edit by hand | All versions |
Out-of-bag scoring requires bootstrapped trees, and ExtraTreesQuantileRegressor defaults to bootstrap=False, so enabling oob_score without bootstrap=True raises ValueError("Out of bag estimation only available if bootstrap=True").
reg = ExtraTreesQuantileRegressor(oob_score=True, random_state=0)reg = ExtraTreesQuantileRegressor(bootstrap=True, oob_score=True, random_state=0)What the rule reports
Section titled “What the rule reports”Calls to RandomForestQuantileRegressor with bootstrap=False and oob_score enabled, and calls to ExtraTreesQuantileRegressor with oob_score enabled without bootstrap=True.
How to fix it
Section titled “How to fix it”Pass bootstrap=True whenever oob_score is enabled, or leave oob_score=False.
Diagnostic message
Section titled “Diagnostic message”Out-of-bag estimation requires bootstrap=True; RandomForestQuantileRegressor raises ValueError when bootstrap=False and oob_score is enabled. Set bootstrap=True or oob_score=False.See all rules in the Quantile Forest pack.