Encoding features with one hot encoding vs ordinal encoding in Data Preprocessing
Why the choice of the ordinal encoder and not one hot encoder when preprocessing our data? I'm guessing our choice affects the performance of our model. In practice, do we have to try both and select the encoding with better performance?
thanks for reaching out! In practice the two types of encoders will likely give similar results (though I have not yet tried the one-hot encoder). The reason for choosing this one here is that we show the one-hot encoder in another course, and I wanted to show our students other possibilities. From my experience though, both techniques lead to very similar results. If you do find a significant difference in the results, I'd be happy if you share them here in the hub.
Hope this helps!