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.
Loading...
Related Quiz
- To enable database migrations in Flask, the ____ extension can be used.
- In Python, the ____ method of a unittest TestCase is run before each test method is executed.
- The ____ method in Pandas is used to drop specified labels from rows or columns.
- What would be the best data structure to implement a priority queue?
- How would you deploy a Django application to a production environment, considering scalability and security?