A library program attendance analytics team faces hundreds of rare contractor license categories that explode feature width under one-hot encoding. What categorical strategy best curbs that dimensionality growth?
Select an answer to reveal the explanation.
Short Explanation
Rare license codes are like dozens of one-off stamp designs—if each gets its own column, the feature table balloons. Feature hashing packs those uncommon labels into a fixed number of bins so the GPU model stays lean.
Full Explanation
A library program attendance analytics team facing hundreds of rare contractor license categories needs a categorical strategy that bounds width. Feature hashing maps high-cardinality license codes into a fixed-width space so uncommon civic codes share compact bins instead of each claiming a sparse one-hot column. That curbs GPU memory growth and sparsity on long-tailed municipal license lists while still allowing rare codes to contribute signal, which is the practical RAPIDS-friendly approach when one-hot cardinality would explode the feature table. One-hot encoding every rare license code into its own column fails by concept: the long civic tail creates extreme width, sparse matrices, and poor generalization for codes seen once. Replacing license codes with the mean of an unrelated numeric column without leakage controls fails both statistically and operationally—it invents a meaningless target-like encoding and risks leakage if that numeric field is outcome-correlated. Deleting the license column entirely fails because high cardinality does not imply zero predictive value; contractor type often matters for attendance and compliance models even when many codes are rare. Exam caveat: hashing trades interpretability and can collide distinct licenses into the same bin; collision rate depends on hash width and should be tuned, not ignored. Operational check: measure unique license cardinality on the library contractor extract, compare one-hot width versus a fixed hash width, train a cuML baseline both ways on GPU memory limits, and inspect whether rare-but-important license groups still influence predictions after hashing.