rules/feature_engine/decision-tree-encoder-unseen-no-fill.md

DecisionTreeEncoder raises ValueError("When unseen='encode' you need to pass a number to fill_value.") whenever unseen="encode" is set without a numeric fill_value.

diff
1-enc = DecisionTreeEncoder(unseen="encode")
2+enc = DecisionTreeEncoder(unseen="encode", fill_value=0.0)

What the rule reports

Calls to DecisionTreeEncoder with unseen="encode" where fill_value is omitted or None.

How to fix it

Pass a numeric fill_value to assign unseen categories during transform, or use unseen="ignore" / unseen="raise".