What is the consequence of using ‘handle_unknown=’ignore” in OneHotEncoder during transformation?

Data Science Medium

Data Science — Medium

What is the consequence of using ‘handle_unknown=’ignore” in OneHotEncoder during transformation?

Key points

  • Prevents errors on unseen data
  • Results in all-zero vectors for unknowns
  • Useful for production pipelines

Ready to go further?

Related questions