|
使用matlab的朴素贝叶斯模型fitcnb函数出现如下问题:
Error using ClassificationNaiveBayes/fitNonMNDists (line 222)
A normal distribution cannot be fit for the combination of class 2 and predictor x1. The data has zero variance.
Error in ClassificationNaiveBayes (line 104)
this.DistributionParameters = fitNonMNDists(this);
Error in classreg.learning.FitTemplate/fit (line 258)
[varargout{1:nargout}] = this.MakeFitObject(X,Y,W,this.ModelParams,fitArgs{:});
Error in ClassificationNaiveBayes.fit (line 132)
this = fit(temp,X,Y);
Error in fitcnb (line 252)
this = ClassificationNaiveBayes.fit(X,Y,RemainingArgs{:});
有人遇到过这种问题吗?
是什么原因导致的?
谢谢! |
|