From Kaggle's intermediate machine learning tutorial, it was stated that
for each column, we randomly assign each unique value to a different integer. This is a common approach that is simpler than providing custom labels; however, we can expect an additional boost in performance if we provide better-informed labels for all ordinal variables.
Here's what I understood:
If I had a column named
place with the unique values being
[first, second, third], then I would get better performance by encoding those as
[1,2,3] compared to
[2,1,3]. Is my understanding correct? If so, how does this lead to better performance? Since the integers are just used as a numeric placeholder for the unique values, does the ordering even matter as long as those integers can uniquely identify each value?