Machine Learning with High-Cardinality Categorical Features in Actuarial Applications