I am reading through https://arxiv.org/pdf/1609.06676.pdf which presents an extension of the isolation forest algorithm so that categorical features may be taken into account. On page 5, the authors note:
... we extend the algorithm to consider categorical data. Our method only requires that for each categorical dimension, values have an ordering. The ordering may be arbitrary. Each value is then mapped to a numeric value, based on its ordering. For example the values true and false may be mapped to false = 0, true = 1. Having mapped the categorical values to numeric values, the categorical dimensions can be treated the same way as the numeric dimensions in the iForest algorithm.
Does this approach make sense?
At first I thought, doesn't this produce the exact same result as applying Scikit-Learn's LabelEncoder()? However, the authors seem to do it without creating a unique set before ordering. A different way would be One-Hot-Encoding, though this blows the feature space up very quickly for high-cardinal categorical features.