Skip to main content
QUICK REVIEW

[논문 리뷰] Comparative Study on the Performance of Categorical Variable Encoders in Classification and Regression Tasks

Wenbin Zhu, Runwen Qiu|arXiv (Cornell University)|2024. 01. 18.
Machine Learning and Data ClassificationComputer Science인용 수 8
한 줄 요약

논문은 이론적으로 및 실증적으로 ATI 모델에서 원-핫 인코더가 다른 인코더를 어떻게 모방할 수 있는지, 그리고 왜 타깃 인코더가 트리 기반 모델에 탁월한지 28개 데이터셋과 여러 모델에 걸쳐 분석한다.

ABSTRACT

Categorical variables often appear in datasets for classification and regression tasks, and they need to be encoded into numerical values before training. Since many encoders have been developed and can significantly impact performance, choosing the appropriate encoder for a task becomes a time-consuming yet important practical issue. This study broadly classifies machine learning models into three categories: 1) ATI models that implicitly perform affine transformations on inputs, such as multi-layer perceptron neural network; 2) Tree-based models that are based on decision trees, such as random forest; and 3) the rest, such as kNN. Theoretically, we prove that the one-hot encoder is the best choice for ATI models in the sense that it can mimic any other encoders by learning suitable weights from the data. We also explain why the target encoder and its variants are the most suitable encoders for tree-based models. This study conducted comprehensive computational experiments to evaluate 14 encoders, including one-hot and target encoders, along with eight common machine-learning models on 28 datasets. The computational results agree with our theoretical analysis. The findings in this study shed light on how to select the suitable encoder for data scientists in fields such as fraud detection, disease diagnosis, etc.

연구 동기 및 목표

  • Encoders와 모델을 분류하여 인코더-모델 호환성을 이해한다.
  • ATI 모델에 대해 원-핫 인코딩이 보편적임을 이론적으로 증명한다.
  • 트리 기반 모델에 대해 타깃 인코더가 왜 유리한지 설명한다.
  • 다수의 모델을 사용하여 28개의 데이터셋에서 14개의 인코더를 실증적으로 비교한다.

제안 방법

  • 인코더를 범주 레벨을 R^l의 벡터로 매핑하는 것으로 정의한다.
  • ATI 모델의 경우 원-핫 인코딩의 선형 변환이 어떤 인코더도 재현할 수 있음을 증명한다.
  • ASPL(average samples per level)을 통해 데이터 충분성을 보이는 수렴 동작을 분석한다.
  • 트리 기반 모델(RF 및 GBDT 등)에 대해 평균(타깃) 인코더를 이론적으로 및 실증적으로 분석한다.
  • 14개의 인코더와 8개의 모델을 28개 데이터셋에서 광범위한 실험을 수행한다; 성능 지표로 F1과 RMSE를 사용하고 상대적 성능 차이를 보고한다.

실험 결과

연구 질문

  • RQ1ATI 모델에 대해 원-핫 인코딩이 다른 인코더를 재현할 수 있는 조건은 무엇인가?
  • RQ2트리 기반 모델에 타깃 인코더가 특히 적합한 이유는 무엇인가?
  • RQ3데이터 충분성(ASPL)이 실제로 인코더 성능에 어떤 영향을 주는가?
  • RQ4어떤 인코더가 광범위한 데이터셋과 모델에서 최고 성능을 발휘하는가?

주요 결과

  • 원-핫 인코딩은 충분한 데이터가 주어지면 ATI 모델에 대해 어떤 인코더도 재현할 수 있다.
  • 타깃 인코더는 더 높은 차원의 범주를 인코딩할 때 더 정보력이 있는 분할을 제공하기 때문에 트리 기반 모델에서 종종 우수한 성능을 발휘한다.
  • ASPL이 증가함에 따라 원-핫과 최상의 인코더 간의 성능 차이가 축소되며, 더 큰 ASPL 데이터셋에서 0에 수렴한다.
  • 평균 인코더의 성능은 ASPL이 낮을 때 저하되지만 더 많은 데이터로 개선되며 때때로 최적의 인코더에 필적한다; SShrink은 데이터가 희박한 설정에서 미세한 이득을 제공할 수 있다.
  • 28개 데이터셋에 걸쳐 타깃 인코더 및 그 변형이 트리 기반 방법의 최상위 성능으로 자주 나타나는 반면, 원-핫은 ATI 모델에서 여전히 강하다。

이 논문 읽기

누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.

누빈트에서 이 논문 읽기

이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.