Ad click prediction is essential for optimizing digital advertising, particularly in targeted campaigns where identifying user engagement is critical. This study investigates the performance of K-Nearest Neighbors (K-NN) and Decision Tree classifiers on a highly imbalanced dataset, where clicks are rare compared to non-clicks. While both models achieved high overall accuracy (89% for K-NN, 83% for Decision Tree), their performance on the minority class was limited. To address class imbalance, a downsampling strategy was applied to the training set while keeping the test set distribution unchanged, allowing for performance evaluation under realistic conditions. This approach led to a trade-off: overall accuracy decreased slightly, but minority class detection improved—Decision Tree recall rose from 0.12 to 0.19, and K-NN from 0.01 to 0.05. In both balanced and imbalanced training scenarios, the Decision Tree consistently outperformed K-NN in detecting the minority class.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Comparison of Decision Tree and K-Nearest Neighbors for Ad Click Prediction

  • Thao Da Dang,
  • Cao Trung Huynh,
  • Hoang Phuong Lam Ngo

摘要

Ad click prediction is essential for optimizing digital advertising, particularly in targeted campaigns where identifying user engagement is critical. This study investigates the performance of K-Nearest Neighbors (K-NN) and Decision Tree classifiers on a highly imbalanced dataset, where clicks are rare compared to non-clicks. While both models achieved high overall accuracy (89% for K-NN, 83% for Decision Tree), their performance on the minority class was limited. To address class imbalance, a downsampling strategy was applied to the training set while keeping the test set distribution unchanged, allowing for performance evaluation under realistic conditions. This approach led to a trade-off: overall accuracy decreased slightly, but minority class detection improved—Decision Tree recall rose from 0.12 to 0.19, and K-NN from 0.01 to 0.05. In both balanced and imbalanced training scenarios, the Decision Tree consistently outperformed K-NN in detecting the minority class.