I'm trying using PCA before bayes classification ,but it says Native Bayes requires nonnegative features values, the training data used is nonnegative, but it turns to negative using PCA, how do I fix it ,Thanks to answer my question
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
If you want to reduce the dimension of your inputs, you can use nonnegative matrix factorization instead. In Spark, this method is in mllib.recommendation.ALS
and then set the nonnegative parameter as True
.