Which transformer converts string class labels into integers?
-
A
StandardScaler
-
B
SimpleImputer
-
C
LabelEncoder
Correct answer
-
D
OneHotEncoder
Correct answer
C. LabelEncoder
16 views
Explanation
LabelEncoder maps each distinct label to an integer code, which suits a target vector.
Reference
Asked in: NTS, PPSC IT, Interviews
Doubts & discussion
Not sure why the answer is C? Ask here and get an explanation.
Ask a doubt about this MCQ