首页 > 解决方案 > 大数据集的多标签分类方法

问题描述

我意识到还有另一个标题相似的问题,但我的数据集非常不同。

我有近 4000 万行和大约 3000 个标签。运行一个简单的 sklearn train_test_split 需要将近 20 分钟。

我最初使用的是多类分类模型,因为这就是我所拥有的全部经验,并且意识到,由于我需要提出所有可能的标签,特定记录可以绑定到,我应该使用多标签分类方法。

我正在寻找有关如何有效地做到这一点的建议。我尝试了二元相关性,花了将近 4 个小时来训练。分类器链在 22 小时后因内存错误而出错。我害怕尝试标签 powerset,因为我读过它们不能很好地处理大量数据。最后,我有适应算法、MlkNN 和集成方法(我也担心性能方面的问题)。

有没有其他人对这类问题和数据量有经验?除了建议的模型之外,我还希望获得有关最佳训练方法的建议,例如 train_test_split 比率或不同/更好的方法。

标签: pythonscikit-learnmultilabel-classification

解决方案


20 minutes for this size of a job doesn't seem that long, neither does 4 hours for training.

I would really try vowpal wabbit. It excels at this sort of multilabel problem and will probably give unmatched performance if that's what you're after. It requires significant tuning and will still require quality training data, but it's well worth it. This is essentially just a binary classification problem. An ensemble will of course take longer so consider whether or not it's necessary given your accuracy requirements.


推荐阅读