MATLAB-使用fitcnb的朴素贝叶斯分类错误
在我的matlab项目中,我想将一些特征分为两类(Stego、Cover)。我使用了fitsvm,它工作正常MATLAB-使用fitcnb的朴素贝叶斯分类错误,matlab,classification,naivebayes,Matlab,Classification,Naivebayes,在我的matlab项目中,我想将一些特征分为两类(Stego、Cover)。我使用了fitsvm,它工作正常 classifier= fitcsvm(pattern,class); 现在我想把分类器改成线性贝叶斯 Dist='normal'; 分类器=fitcnb(模式、类别、分布、距离); 但当我使用该函数时,matlab返回一个错误: A normal distribution cannot be fit for the combination of class 1 and predic
classifier= fitcsvm(pattern,class);
现在我想把分类器改成线性贝叶斯
Dist='normal';
分类器=fitcnb(模式、类别、分布、距离);
但当我使用该函数时,matlab返回一个错误:
A normal distribution cannot be fit for the combination of class 1 and predictor x1. The data has zero variance.
我应该如何使用fitcnb功能