is it possible Apply PCA on any Text Classification?

后端 未结 3 1284
南旧
南旧 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:23

    The problem is that by applying dimensionality reduction, you will generate negative features. However, Multinominal NB does not take negative features. Please refer to this questions.

    Try another classifier such as RandomForest or try using sklearn.preprocessing.MinMaxScaler() to scale your training features to [0,1]

提交回复
热议问题