Skip to content

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)

Calls to RandomForestQuantileRegressor with bootstrap=False and oob_score enabled, and calls to ExtraTreesQuantileRegressor with oob_score enabled without bootstrap=True.

Pass bootstrap=True whenever oob_score is enabled, or leave oob_score=False.

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.