is it possible Apply PCA on any Text Classification?

后端 未结 3 1283
南旧
南旧 2021-02-05 15:14

I\'m trying a classification with python. I\'m using Naive Bayes MultinomialNB classifier for the web pages (Retrieving data form web to text , later I classify this text: web c

3条回答
  •  一整个雨季
    2021-02-05 15:19

    The NaiveBayes classifier needs discrete-valued features, but the PCA breaks this property of the features. You will have to use a different classifier if you want to use PCA.

    There may be other dimensionality reduction methods that work with NB, but I don't know about those. Maybe simple feature selection could work.

    side note: You could try to discretize the features after applying the PCA, but I don't think this is a good idea.

提交回复
热议问题