menu
techminis

A naukri.com initiative

google-web-stories
Home

>

ML News

>

How to Han...
source image

Medium

6d

read

128

img
dot

How to Handle Unseen Data with One-Hot Encoding in Machine Learning

  • This error occurs because your test data contains categories that weren’t present in the training data.
  • One-hot encoding is a method used to convert categorical variables into a format that can be provided to machine learning algorithms.
  • One-Hot Encoding transforms each category of a feature into a binary column (0 or 1).
  • handle_unknown=’ignore’ can be used in OneHotEncoder from scikit-learn to handle unseen categories gracefully.

Read Full Article

like

7 Likes

For uninterrupted reading, download the app