Skip to main content
QUICK REVIEW

[论文解读] An Improved k-Nearest Neighbor Algorithm for Text Categorization

Baoli Li, Shiwen Yu|ArXiv.org|Jun 16, 2003
Text and Document Classification Technologies参考文献 2被引用 86
一句话总结

本文提出了一种用于文本分类的类别自适应 k-NN 算法,该算法根据训练集中的类别频率动态调整每类的最近邻数量,从而减少对大类的偏差。在中文文本上的实验表明,该方法在小类别上的性能得到提升,且对 k 的敏感性降低,尤其在无法进行交叉验证时表现更优。

ABSTRACT

k is the most important parameter in a text categorization system based on k-Nearest Neighbor algorithm (kNN).In the classification process, k nearest documents to the test one in the training set are determined firstly. Then, the predication can be made according to the category distribution among these k nearest neighbors. Generally speaking, the class distribution in the training set is uneven. Some classes may have more samples than others. Therefore, the system performance is very sensitive to the choice of the parameter k. And it is very likely that a fixed k value will result in a bias on large categories. To deal with these problems, we propose an improved kNN algorithm, which uses different numbers of nearest neighbors for different categories, rather than a fixed number across all categories. More samples (nearest neighbors) will be used for deciding whether a test document should be classified to a category, which has more samples in the training set. Preliminary experiments on Chinese text categorization show that our method is less sensitive to the parameter k than the traditional one, and it can properly classify documents belonging to smaller classes with a large k. The method is promising for some cases, where estimating the parameter k via cross-validation is not allowed.

研究动机与目标

  • 为解决传统 k-NN 文本分类中因训练数据类别分布不均导致的偏差问题。
  • 通过允许类别特定的 k 值,降低对固定 k 的敏感性。
  • 在不依赖交叉验证进行 k 选择的前提下,提升少数类(较小类别)的分类准确率。
  • 开发一种方法,基于训练数据统计,为频繁出现的类别使用更多邻居,为稀有类别使用更少邻居。

提出的方法

  • 该算法根据每个类别在训练样本中的数量,为每个类别分配不同的 k 值。
  • 对于每个测试文档,使用类别特定的 k 值,分别从每个类别中选择 k 个最近邻。
  • 最终分类通过类别特定最近邻的多数投票决定。
  • 每个类别使用的邻居数量与训练集中该类别大小成正比,使大类别获得更多的邻居。
  • 通过使用类别频率的函数计算每个类别的动态 k 值,避免使用固定 k。
  • 在分类过程中,该方法独立应用于每个类别,确保大类别在决策中贡献更多。

实验结果

研究问题

  • RQ1按类别动态选择 k 如何影响类别不平衡文本分类中的分类性能?
  • RQ2类别自适应 k-NN 方法能否在文本分类中减少对大类的偏差?
  • RQ3与固定 k 的 k-NN 相比,该方法在多大程度上降低了对 k 选择的敏感性?
  • RQ4该方法能否在不依赖交叉验证进行 k 调优的情况下,有效分类小类别文档?

主要发现

  • 与传统的固定 k k-NN 算法相比,所提方法显著降低了对 k 选择的敏感性。
  • 该算法提升了小类别分类的准确率,尤其是在使用较大 k 值时表现更优。
  • 该方法在保持大类别高性能的同时,增强了对少数类的检测能力。
  • 在无法进行 k 选择的交叉验证的场景下,该方法依然有效。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。