When preprocessing data, the ____ class in Scikit-learn is used to encode categorical features as a one-hot numeric array.

  • LabelEncoder
  • OneHotEncoder
  • PCA
  • StandardScaler
In Scikit-learn, the OneHotEncoder class is used to transform categorical features into a one-hot encoded numeric array. This process is essential when working with machine learning algorithms that require numeric input, as it converts categorical data into a format that the algorithms can understand.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *