【问题标题】:Should CountVectorizer be fit on both the train and test sets?CountVectorizer 是否应该同时适用于训练集和测试集?
【发布时间】:2019-12-09 21:40:55
【问题描述】:

我在网上看到了各种文章,其中一些建议 CountVectorizer 应该适合训练集和测试集,还有一些建议它应该只适合训练集。 哪种方法通常更适合文本分类?

【问题讨论】:

    标签: python python-3.x scikit-learn countvectorizer


    【解决方案1】:

    通常test_set 应保持不可见,因此CountVectorizer 应仅安装在train_set

    【讨论】:

      猜你喜欢
      • 2020-05-13
      • 1970-01-01
      • 2018-10-10
      • 2019-08-21
      • 2020-06-01
      • 2017-11-01
      • 1970-01-01
      • 2018-02-01
      • 2015-01-17
      相关资源
      最近更新 更多