Hi
I want to know when we convert text to numbers using LabelEncoder then it gives same equivalent label to test & train data ?
For example let’s say “boat” feature has three unique values “CD”,“A” & “XY” . Then for training data I train feature “boat” via LabelEncoder and I get following labels:
CD=0
A=1
XY=2
Now when I train “boat” feature of test data via LabelEncoder, then will I get same label tags as I got for Training data i.e CD=0,A=1,XY=2 ?? because if it’s not the case then it will lead to wrong predictions.
Thank You