Efficient Representations for High-Cardinality Categorical Variables in Machine Learning