handson-ml3
handson-ml3 copied to clipboard
[BUG] OneHotEncoder error
in 02_end_to_end these lines give an error:
cat_encoder = OneHotEncoder()
housing_cat_1hot = cat_encoder.fit_transform(housing_cat)
"Pandas output does not support sparse data."
The fix seems to be:
cat_encoder = OneHotEncoder(sparse_output=False)