Lost in the Forest: Encoding categorical variables and the absent levels problem
Data Mining and Knowledge Discovery · 2024-07 · 38 (4) · 1889-1908
DOI: 10.1007/s10618-024-01019-w ↗Kurz gefasst
Fachartikel in der Zeitschrift Data Mining and Knowledge Discovery, online erschienen am 10.04.2024. Verfasst von Helen L. Smith und 4 weiteren Autor:innen. Die Arbeit wurde bisher 19-mal zitiert (Crossref) und nennt 52 Literaturangaben. Der Volltext ist frei zugänglich (Open Access, CC BY 4.0). Gefördert von: Massey University.
Abstract (Originalsprache)
Levels of a predictor variable that are absent when a classification tree is grown can not be subject to an explicit splitting rule. This is an issue if these absent levels are present in a new observation for prediction. To date, there remains no satisfactory solution for absent levels in random forest models. Unlike missing data, absent levels are fully observed and known. Ordinal encoding of predictors allows absent levels to be integrated and used for prediction. Using a case study on source attribution of Campylobacter species using whole genome sequencing (WGS) data as predictors, we examine how target-agnostic versus target-based encoding of predictor variables with absent levels affects the accuracy of random forest models. We show that a target-based encoding approach using class probabilities, with absent levels designated the highest rank, is systematically biased, and that this bias is resolved by encoding absent levels according to the a priori hypothesis of equal class probability. We present a novel method of ordinal encoding predictors via principal coordinates analysis (PCO) which capitalizes on the similarity between pairs of predictor levels. Absent levels are encoded according to their similarity to each of the other levels in the training data. We show that the PCO-encoding method performs at least as well as the target-based approach and is not biased.
Förderung
- Massey University
Zitieren
APA
Smith, H. L., Biggs, P. J., French, N. P., Smith, A. N. H., & Marshall, J. C. (2024). Lost in the Forest: Encoding categorical variables and the absent levels problem. Data Mining and Knowledge Discovery, 38(4), 1889-1908. https://doi.org/10.1007/s10618-024-01019-w
Vancouver
Smith HL, Biggs PJ, French NP, Smith ANH, Marshall JC. Lost in the Forest: Encoding categorical variables and the absent levels problem. Data Mining and Knowledge Discovery. 2024;38(4):1889-1908. doi:10.1007/s10618-024-01019-w
BibTeX
@article{Smith2024,
author = {Smith, Helen L. and Biggs, Patrick J. and French, Nigel P. and Smith, Adam N. H. and Marshall, Jonathan C.},
title = {Lost in the Forest: Encoding categorical variables and the absent levels problem},
journal = {Data Mining and Knowledge Discovery},
year = {2024},
volume = {38},
number = {4},
pages = {1889--1908},
doi = {10.1007/s10618-024-01019-w}
}
EUVIMED